[prev in list] [next in list] [prev in thread] [next in thread]
List: dpdk-dts
Subject: [dts] [PATCH] framework packet: fix fortville can't receive with default mac
From: Marvin Liu <yong.liu () intel ! com>
Date: 2016-07-20 6:02:59
Message-ID: 1468994579-30050-1-git-send-email-yong.liu () intel ! com
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic