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 489D52BD7 for ; Thu, 18 Aug 2016 08:34:31 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 17 Aug 2016 23:34:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,537,1464678000"; d="scan'208";a="1043275454" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 17 Aug 2016 23:34:29 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u7I6YRvm029025; Thu, 18 Aug 2016 14:34:27 +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 u7I6YPhv025334; Thu, 18 Aug 2016 14:34:27 +0800 Received: (from yufengmx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u7I6YPL7025330; Thu, 18 Aug 2016 14:34:25 +0800 From: Yufen Mo To: dts@dpdk.org Cc: yufengmx Date: Thu, 18 Aug 2016 14:33:22 +0800 Message-Id: <1471502003-25292-2-git-send-email-yufengx.mo@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1471502003-25292-1-git-send-email-yufengx.mo@intel.com> References: <1471502003-25292-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: Thu, 18 Aug 2016 06:34:31 -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