summaryrefslogtreecommitdiffstats
path: root/test/patches/scapy-2.4.3/ipsec.patch
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-04-01 09:45:23 +0000
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2020-05-05 18:36:33 +0000
commitabc5660c61698fa29252dc202358002a97f2608c (patch)
tree969edc7dc2145e40e3fb96c470df917f2053abfe /test/patches/scapy-2.4.3/ipsec.patch
parent6fdd7a5f77301a3398c4445bfef202b123ce90d8 (diff)
ipsec: User can choose the UDP source port
Type: feature thus allowing NAT traversal, Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: Ie8650ceeb5074f98c68d2d90f6adc2f18afeba08 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/patches/scapy-2.4.3/ipsec.patch')
-rw-r--r--test/patches/scapy-2.4.3/ipsec.patch11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/patches/scapy-2.4.3/ipsec.patch b/test/patches/scapy-2.4.3/ipsec.patch
index 993604768ff..7ee8316bce3 100644
--- a/test/patches/scapy-2.4.3/ipsec.patch
+++ b/test/patches/scapy-2.4.3/ipsec.patch
@@ -2,6 +2,14 @@ diff --git a/scapy/layers/ipsec.py b/scapy/layers/ipsec.py
index f8c601fa..f566d288 100644
--- a/scapy/layers/ipsec.py
+++ b/scapy/layers/ipsec.py
+@@ -138,6 +138,7 @@ bind_layers(IP, ESP, proto=socket.IPPROTO_ESP)
+ bind_layers(IPv6, ESP, nh=socket.IPPROTO_ESP)
+ bind_layers(UDP, ESP, dport=4500) # NAT-Traversal encapsulation
+ bind_layers(UDP, ESP, sport=4500) # NAT-Traversal encapsulation
++bind_layers(UDP, ESP, dport=4545) # NAT-Traversal encapsulation - random port
+
+ ###############################################################################
+
@@ -359,11 +359,8 @@ class CryptAlgo(object):
encryptor = cipher.encryptor()
@@ -147,7 +155,7 @@ index f8c601fa..f566d288 100644
esp = self.crypt_algo.decrypt(self, encrypted, self.crypt_key,
self.crypt_algo.icv_size or
-@@ -1050,9 +1069,10 @@ class SecurityAssociation(object):
+@@ -1050,11 +1069,12 @@ class SecurityAssociation(object):
def _decrypt_ah(self, pkt, verify=True):
@@ -160,3 +168,4 @@ index f8c601fa..f566d288 100644
ah = pkt[AH]
payload = ah.payload
+