From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 81BB42C01 for ; Wed, 4 Jan 2017 04:42:51 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 03 Jan 2017 19:42:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,458,1477983600"; d="scan'208";a="1107646492" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 03 Jan 2017 19:42:50 -0800 From: yufengmx To: dts@dpdk.org Cc: yufengmx Date: Wed, 4 Jan 2017 11:43:55 +0800 Message-Id: <1483501435-25560-2-git-send-email-yufengx.mo@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1483501435-25560-1-git-send-email-yufengx.mo@intel.com> References: <1483501435-25560-1-git-send-email-yufengx.mo@intel.com> Subject: [dts] [PATCH V1]framework: src mac won't be set. 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, 04 Jan 2017 03:42:51 -0000 *. src mac won't be set when make some pesudo packet. Signed-off-by: yufengmx --- framework/packet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/packet.py b/framework/packet.py index f19a638..fb99d35 100755 --- a/framework/packet.py +++ b/framework/packet.py @@ -345,7 +345,8 @@ class scapy(object): 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) + if self.pkt.getlayer(0).src == "00:00:00:00:00:00": + self.pkt.getlayer(0).src = get_if_hwaddr(intf) sendp(self.pkt, iface=intf, count=count) -- 1.9.3