multicast: stream MAC sender continuously like the IPv4 sender

This commit is contained in:
Mattias Walström
2026-06-27 08:41:22 +02:00
parent 8c6f9cec49
commit 013932ed06
+4 -1
View File
@@ -65,7 +65,10 @@ class MacMCastSender:
send_cmd = (
"from scapy.all import sendp, Ether; "
f"pkt=Ether(src='aa:bb:cc:dd:ee:ff', dst='{self.group}', type=0xdead); "
"sendp(pkt, iface='iface', count=50, inter=1./10)"
# loop until SIGINT (set on __exit__), like the IPv4 MCastSender's
# msend; a fixed count would drain before later verification steps
# run and they would capture nothing.
"sendp(pkt, iface='iface', inter=1./10, loop=1)"
)
self.proc = self.netns.popen(["python3", "-c", send_cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
return self