From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A11045587 for ; Mon, 15 Aug 2016 05:30:35 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 14 Aug 2016 20:30:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,523,1464678000"; d="scan'208";a="155753916" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga004.fm.intel.com with ESMTP; 14 Aug 2016 20:30:34 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u7F3UWg6010958; Mon, 15 Aug 2016 11:30:32 +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 u7F3UUnq003984; Mon, 15 Aug 2016 11:30:32 +0800 Received: (from yufengmx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u7F3UUnC003980; Mon, 15 Aug 2016 11:30:30 +0800 From: Yufen Mo To: dts@dpdk.org Cc: yufengmx Date: Mon, 15 Aug 2016 11:30:24 +0800 Message-Id: <1471231825-3942-2-git-send-email-yufengx.mo@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1471231825-3942-1-git-send-email-yufengx.mo@intel.com> References: <1471231825-3942-1-git-send-email-yufengx.mo@intel.com> Subject: [dts] [PATCH V1 1/2] framewok: fixed packet module defect 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: Mon, 15 Aug 2016 03:30:36 -0000 From: yufengmx add condition for packet address change when src mac is zero, this process cause that written pcap is not the same as received pcap 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 6c892e5..465350f 100755 --- a/framework/packet.py +++ b/framework/packet.py @@ -318,7 +318,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) -- 1.9.3