You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same stale-slot pattern as #42. IPv6 scope ids and the sticky IPV6_PKTINFO ifindex are stored as raw slot+1 at connect/bind/setsockopt (src/bsdsocket/socket.c:1440, :1451, :2432, :2455, :2506; src/bsdsocket/cmsg.c:641) and re-checked on each send only against nx_interface_valid (socket.c:2040-2066, cmsg.c:474-478); receive filtering compares the number only (src/bsdsocket/transfer.c:993-999).
Repro: UDP socket connect()s to fe80::1%k (or sets sticky IPV6_PKTINFO{ifindex=k}); RemoveNetInterface k; AddNetInterface another device into slot k; send() leaves by the new link to its fe80::1, and that router's datagrams are accepted. Expected: EADDRNOTAVAIL / ENETUNREACH.
Also, low: an IPv4 per-datagram IP_PKTINFO ifindex naming an empty slot is returned without a validity check (cmsg.c:515-521); the datagram is dropped later instead of failing with EADDRNOTAVAIL.
Fix after #48 lands: record netstack_interface_epoch() with the stored index and treat a changed epoch as gone. Test: emulator run modelled on run-mcastepoch.sh expecting the error after slot reuse.
Follow-up on main a213cfc: the connected peer's zone was still read before the NetX bracket in send/sendto/sendmsg, so a slot removed and reattached in that window was missed. It is now resolved inside the bracket, and the connected address, port and zone are copied together there (dfb64a3, 5d67ec9; tests 84b558f, d1d70cd, covering UDP and raw with a peer change during the allocate wait). The host32 test_transfer/test_cork link break from #83 is fixed in the same branch. CI 36241074109 green.
Activity
bsdsocket: expire stored IPv6 zones across interface slot reuse (#51)
bsdsocket: expire stored IPv6 zones across interface slot reuse (#51) (…
tests: keep main's #51 stubs (4498196) over the duplicates from d6e47cb
transfer: resolve the connected peer's zone inside the bracket (#51)
transfer: snapshot the connected peer inside the bracket (#51 review)
test_cork: stub bsd_scope_live, which transfer.c calls since #51
test_transfer: stub bsd_scope_live too (#51)
integration: keep #51's bsd_scope_live stubs, drop #53's duplicates
image size: default bsdsocket budget 365000 for the review fixes
tinic commentedon Sep 26, 2026
Follow-up on main a213cfc: the connected peer's zone was still read before the NetX bracket in send/sendto/sendmsg, so a slot removed and reattached in that window was missed. It is now resolved inside the bracket, and the connected address, port and zone are copied together there (dfb64a3, 5d67ec9; tests 84b558f, d1d70cd, covering UDP and raw with a peer change during the allocate wait). The host32 test_transfer/test_cork link break from #83 is fixed in the same branch. CI 36241074109 green.