mirror of https://github.com/secdev/scapy.git
Handle OpenBSD routes with locked MTU.
In OpenBSD the MTU value of a route may be locked. This is indicated by an ' L' in the netstat -r output. For scapy's read_routes() this looks like an additional column. Make the parser aware of this possibility when finding the network interface.
This commit is contained in:
parent
71c23dafef
commit
bd10cf56c4
|
@ -78,7 +78,8 @@ def read_routes():
|
|||
else:
|
||||
rt = l.split()
|
||||
dest,gw,flg = rt[:3]
|
||||
netif = rt[4 + mtu_present + prio_present + refs_present]
|
||||
locked = OPENBSD and rt[6] == "L"
|
||||
netif = rt[4 + mtu_present + prio_present + refs_present + locked]
|
||||
if flg.find("Lc") >= 0:
|
||||
continue
|
||||
if dest == "default":
|
||||
|
|
Loading…
Reference in New Issue