Use scapy port names

This commit is contained in:
Nico Schottelius 2019-05-06 12:56:26 +02:00
parent 78b037038a
commit 8b5126e371

View file

@ -529,9 +529,9 @@ class L2Controller(object):
id = self.nat64_tcp_session_entry(pkg[IPv6].src, id = self.nat64_tcp_session_entry(pkg[IPv6].src,
pkg[TCP].src_port, pkg[TCP].sport,
pkg[IPv6].dst, pkg[IPv6].dst,
pkg[TCP].dst_port) pkg[TCP].dport)
# Has already been added? then it's a race condition and # Has already been added? then it's a race condition and
@ -543,8 +543,8 @@ class L2Controller(object):
# FIXME: Change randomly later, supporting 1:N mappings # FIXME: Change randomly later, supporting 1:N mappings
# Keep the same for the moment # Keep the same for the moment
tcp_src_port = pkg[TCP].src_port tcp_src_port = pkg[TCP].sport
tcp_dst_port = pkg[TCP].dst_port tcp_dst_port = pkg[TCP].dport
# FIXME: range, reuse, etc. # FIXME: range, reuse, etc.
ipv4_src_addr = self.nat64_session_net[self.mode] ipv4_src_addr = self.nat64_session_net[self.mode]
@ -555,9 +555,9 @@ class L2Controller(object):
"nat64_tcp_session_translate", "nat64_tcp_session_translate",
[ [
pkg[IPv6].src, pkg[IPv6].src,
pkg[TCP].src_port, pkg[TCP].sport,
pkg[IPv6].dst, pkg[IPv6].dst,
pkg[TCP].dst_port pkg[TCP].dport
], ],
[ [
ipv4_src_addr, ipv4_src_addr,