When there is a locked MTU in the routing table, scapy gets confused

by the additional L.  So be aware of this additional column in
read_routes().
ok danj@
This commit is contained in:
bluhm 2018-03-07 16:43:43 +00:00
parent 1be749ad4f
commit 0aa9dfaece
2 changed files with 19 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.24 2016/12/09 16:40:11 bluhm Exp $
# $OpenBSD: Makefile,v 1.25 2018/03/07 16:43:43 bluhm Exp $
COMMENT= powerful interactive packet manipulation in python
MODPY_EGG_VERSION= 2.3.3
DISTNAME= scapy-${MODPY_EGG_VERSION}
REVISION = 1
REVISION = 2
CATEGORIES= net

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-scapy_arch_unix_py,v 1.4 2018/03/07 16:43:43 bluhm Exp $
https://github.com/secdev/scapy/pull/1213
Index: scapy/arch/unix.py
--- scapy/arch/unix.py.orig
+++ scapy/arch/unix.py
@@ -79,7 +79,8 @@ def read_routes():
else:
rt = l.split()
dest,gw,flg = rt[:3]
- netif = rt[4 + mtu_present + prio_present + refs_present]
+ locked = scapy.arch.OPENBSD and rt[6] == "L"
+ netif = rt[4 + mtu_present + prio_present + refs_present + locked]
if flg.find("Lc") >= 0:
continue
if dest == "default":