From f55aeddd0eb080b56908302dbcff9b4d0222d644 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 6 May 2019 13:10:40 +0200 Subject: [PATCH] hard code 0 network in session handling => effectively only using 1 net at the moment --- p4app/controller.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/p4app/controller.py b/p4app/controller.py index 4bcaea9..559ce7c 100755 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -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,