[dts] [PATCH V1 1/2] framewok: fixed packet module defect
Yufen Mo
yufengx.mo at intel.com
Thu Aug 18 08:33:22 CEST 2016
From: yufengmx <yufengx.mo at intel.com>
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 <yufengx.mo at intel.com>
---
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
More information about the dts
mailing list