aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/netboot2
-rw-r--r--tools/tunbridge.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/tools/netboot b/tools/netboot
index ccc7116..3d27cf8 100755
--- a/tools/netboot
+++ b/tools/netboot
@@ -114,6 +114,8 @@ def main():
try: pkt = os.read(tun, 2048)
except Exception: return
if not pkt: return
+ if len(pkt) < 20 or pkt[16:20] != b"\x0a\x00\x00\x02":
+ continue # only unicast to 10.0.0.2 (drop mcast noise)
try: conn.sendall(slip_encode(pkt))
except Exception: return
threading.Thread(target=sock_to_tun, daemon=True).start()
diff --git a/tools/tunbridge.py b/tools/tunbridge.py
index b462c1b..f5e391c 100644
--- a/tools/tunbridge.py
+++ b/tools/tunbridge.py
@@ -68,6 +68,8 @@ def main():
while True:
pkt = os.read(tun, 2048)
if not pkt: return
+ if len(pkt) < 20 or pkt[16:20] != b"\x0a\x00\x00\x02":
+ continue # only unicast to 10.0.0.2 (drop mcast noise)
try: p.stdin.write(slip_encode(pkt)); p.stdin.flush()
except Exception: return