eUpdate prefix/network for mapped v4 network
This commit is contained in:
parent
1e04446398
commit
1dd33177f1
2 changed files with 8 additions and 3 deletions
|
@ -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 | |
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue