* [dts] [PATCH] framework packet: fix fortville can't receive with default mac
@ 2016-07-20 6:02 Marvin Liu
0 siblings, 0 replies; only message in thread
From: Marvin Liu @ 2016-07-20 6:02 UTC (permalink / raw)
To: dts; +Cc: Marvin Liu
Fortville will drop packets with 00:00:00:00:00:00 source mac.
Add real source mac will work around this.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
diff --git a/framework/packet.py b/framework/packet.py
index a46fd47..9725055 100755
--- a/framework/packet.py
+++ b/framework/packet.py
@@ -59,6 +59,7 @@ from scapy.sendrecv import sniff
from scapy.route import *
from scapy.packet import bind_layers, Raw
from scapy.sendrecv import sendp
+from scapy.arch import get_if_hwaddr
# load extension layers
exec_file = os.path.realpath(__file__)
@@ -296,6 +297,8 @@ class scapy(object):
def send_pkt(self, intf=''):
self.print_summary()
if intf != '':
+ # fix fortville can't receive packets with 00:00:00:00:00:00
+ self.pkt.getlayer(0).src = get_if_hwaddr(intf)
sendp(self.pkt, iface=intf)
--
1.9.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-20 6:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-20 6:02 [dts] [PATCH] framework packet: fix fortville can't receive with default mac Marvin Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).