From e442252d72f1aab4c332a76983cd3924ce2b492b Mon Sep 17 00:00:00 2001 From: user Date: Fri, 17 Jul 2026 13:29:42 +0200 Subject: net: keep network packets out of the console (fixes shell garbage on netboot) The link port is both the console-input fallback and the network. At the shell prompt the host's multicast (mDNS/LLMNR/IGMP) was fed to the serial and KGetc read those packet bytes as console input -> garbage in the shell, OSK unusable. Two-part fix: - KGetc now skips SLIP frames (0xC0-delimited) on the serial console path, so inbound packets never surface as console input. Plain injected bytes (the headless tunbridge command path) still pass through. New wConInSkip flag. - netboot/tunbridge only forward IP packets destined to 10.0.0.2 (drop the multicast noise at the bridge). Verified: GB sits at a clean "/#" prompt while all packets (noise included) are forwarded; being-pinged (3/3) and wget still work. On the emulator, the OSK is SELECT=space, START=enter, A=z, B=x, d-pad=WASD/arrows. --- tools/netboot | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/netboot') 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() -- cgit v1.3.1-sl0p