hard code 0 network in session handling
=> effectively only using 1 net at the moment
This commit is contained in:
parent
736350eb68
commit
f55aeddd0e
1 changed files with 4 additions and 4 deletions
|
@ -547,12 +547,12 @@ class L2Controller(object):
|
|||
tcp_dst_port = pkg[TCP].dport
|
||||
|
||||
# FIXME: range, reuse, etc.
|
||||
idx = self.nat64_session_net[self.mode]['v4_idx']
|
||||
self.nat64_session_net[self.mode]['v4_idx'] += 1
|
||||
idx = self.nat64_session_net[self.mode][0]['v4_idx']
|
||||
self.nat64_session_net[self.mode][0]['v4_idx'] += 1
|
||||
|
||||
ipv4_src_addr = self.nat64_session_net[self.mode]['v4_net'][idx]
|
||||
ipv4_src_addr = self.nat64_session_net[self.mode][0]['v4_net'][idx]
|
||||
ipv6_dst_addr = ipaddress.IPv6Address(pkg[IPv6].dst)
|
||||
ipv4_dst_addr = int(ipv6_dst_addr) - int(self.nat64_session_net[self.mode]['v6_net'][0])
|
||||
ipv4_dst_addr = int(ipv6_dst_addr) - int(self.nat64_session_net[self.mode][0]['v6_net'][0])
|
||||
|
||||
log.debug("src v4={}, dst v6 = {}, dst v4 = {}".format(ipv4_src_addr,
|
||||
ipv6_dst_addr,
|
||||
|
|
Loading…
Reference in a new issue