aboutsummaryrefslogtreecommitdiffstats
path: root/test/patches/scapy-2.4.5/cdp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'test/patches/scapy-2.4.5/cdp.patch')
-rw-r--r--test/patches/scapy-2.4.5/cdp.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/patches/scapy-2.4.5/cdp.patch b/test/patches/scapy-2.4.5/cdp.patch
new file mode 100644
index 00000000000..8fa9f69cc80
--- /dev/null
+++ b/test/patches/scapy-2.4.5/cdp.patch
@@ -0,0 +1,14 @@
+diff --git a/scapy/contrib/cdp.py b/scapy/contrib/cdp.py
+index a1532b78..83963ff4 100644
+--- a/scapy/contrib/cdp.py
++++ b/scapy/contrib/cdp.py
+@@ -392,7 +392,7 @@ class _CDPChecksum:
+ This padding is only used for checksum computation. The original
+ packet should not be altered."""
+ if len(pkt) % 2:
+- last_chr = orb(pkt[-1])
++ last_chr = orb(pkt[len(pkt)-1:])
+ if last_chr <= 0x80:
+ return pkt[:-1] + b'\x00' + chb(last_chr)
+ else:
+