Skip to content
Snippets Groups Projects
Commit 7d283bfb authored by Pierre LALET's avatar Pierre LALET
Browse files

Use conf.iface MAC address by default when Scapy cannot find the route

parent d5b2e6e5
No related branches found
No related tags found
No related merge requests found
......@@ -103,7 +103,9 @@ class SourceMACField(MACField):
MACField.__init__(self, name, None)
def i2h(self, pkt, x):
if x is None:
iff,a,gw = pkt.payload.route()
iff, a, gw = pkt.payload.route()
if iff is None:
iff = conf.iface
if iff:
try:
x = get_if_hwaddr(iff)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment