From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A94F5256 for ; Wed, 20 Jul 2016 08:03:13 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 19 Jul 2016 23:03:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,392,1464678000"; d="scan'208";a="1020305706" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 19 Jul 2016 23:03:08 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u6K6353Y019080; Wed, 20 Jul 2016 14:03:05 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u6K632Oj030086; Wed, 20 Jul 2016 14:03:04 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u6K632a4030082; Wed, 20 Jul 2016 14:03:02 +0800 From: Marvin Liu To: dts@dpdk.org Cc: Marvin Liu Date: Wed, 20 Jul 2016 14:02:59 +0800 Message-Id: <1468994579-30050-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] framework packet: fix fortville can't receive with default mac X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 06:03:14 -0000 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 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