diff --git a/doc/plan.org b/doc/plan.org index 0620d34..41ad85f 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -108,6 +108,9 @@ | | - checksum not yet ported for translations | | | | - how to get mask from lpm table match? | | | | - how to get network from lpm match? | | +| | - Create p4lang/p4-spec bug | | +| | https://github.com/p4lang/p4-spec/issues/745 | | +| | | | | | | | | | | | | 2019-03-30 | NAT64 1:1 table ICMP, ICMPv6 working | | diff --git a/p4app/controller.py b/p4app/controller.py index 45c97eb..acc0f3b 100644 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -62,10 +62,12 @@ class L2Controller(object): self.info['v4_mask'] = 24 self.info['v4_base'] = ipaddress.ip_network("10.0.0.0/8") self.info['v4_gen'] = self.info['v4_base'].subnets(new_prefix=self.info['v4_mask']) - self.info['v4_nat64_map'] = ipaddress.ip_network("10.1.0.0/16") + + self.info['v4_nat64_base'] = ipaddress.ip_network("10.1.0.0/16") + self.info['v4_nat64_map'] = self.info['v4_nat64_base'].subnets(new_prefix=self.info['v4_mask']) self.info['switch_suffix'] = 0x42 - self.info['nat64_nat_prefix'] = ipaddress.ip_network("64:ff9b::/96") + self.info['nat64_prefix'] = ipaddress.ip_network("64:ff9b::/96") self.v6_routes = {} self.v6_routes[None] = [] @@ -112,7 +114,7 @@ class L2Controller(object): for mode in ["range_router"]: for net in self.v6_routes[mode]: v6_net = net - v4_net = self.info['v6_nat64_map'].next() + v4_net = self.info['v4_nat64_map'].next() self.nat64_map[mode].append({ "v6_network": v6_net,