From: Marvin Liu <yong.liu@intel.com>
To: dts@dpdk.org
Cc: Marvin Liu <yong.liu@intel.com>
Subject: [dts] [PATCH] framework packet: fix fortville can't receive with default mac
Date: Wed, 20 Jul 2016 14:02:59 +0800 [thread overview]
Message-ID: <1468994579-30050-1-git-send-email-yong.liu@intel.com> (raw)
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
reply other threads:[~2016-07-20 6:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468994579-30050-1-git-send-email-yong.liu@intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).