fix(gateway): request promiscuous AF_PACKET membership
The gateway now asks Linux for PACKET_MR_PROMISC membership on the bound AF_PACKET socket. The tunnel depends on receiving LAN frames addressed to remote client MACs, not only frames addressed to the gateway NIC's own MAC. The switch may learn those remote MACs on the gateway port, but the NIC can still filter the unicast frames unless the packet socket requests promiscuous packet membership. This keeps the promiscuous lifetime scoped to the packet socket. If the kernel rejects the membership request, gateway startup fails instead of running in a mode that cannot reliably capture remote-client replies from the LAN. Test Plan: - cargo fmt --check - cargo test -p lanparty-gateway - cargo clippy -p lanparty-gateway --all-targets -- -D warnings - cargo test --workspace - cargo clippy --workspace --all-targets -- -D warnings - git diff --check Refs: PLAN.md
This commit is contained in:
@@ -116,10 +116,10 @@ cargo run -p lanparty-gateway -- \
|
||||
|
||||
The gateway connects to the relay as `role = gateway`, completes the
|
||||
control-stream hello/welcome handshake, opens an AF_PACKET socket on the LAN
|
||||
interface, and bridges Ethernet frames between the relay and wired LAN until
|
||||
shutdown. It tracks remote-client source MACs seen from relay traffic and
|
||||
periodically emits small CAM refresh frames so the physical switch keeps those
|
||||
MACs associated with the gateway port.
|
||||
interface with promiscuous packet membership, and bridges Ethernet frames
|
||||
between the relay and wired LAN until shutdown. It tracks remote-client source
|
||||
MACs seen from relay traffic and periodically emits small CAM refresh frames so
|
||||
the physical switch keeps those MACs associated with the gateway port.
|
||||
|
||||
## Windows Client
|
||||
|
||||
|
||||
Reference in New Issue
Block a user