libkernel: getsockname still returns the old local address after a UDP association is dissolved #8681
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-20T20:53:21Z.
Repro
connect(s, 127.0.0.1:P)on an unbound UDP socket, thenconnect(s, AF_UNSPEC), thengetsockname(s).Expected (FreeBSD 11.4
udp_disconnect, sys/netinet/udp_usrreq.c): the local address is INADDR_ANY, the port is kept.Actual: 127.0.0.1 (Windows; Linux keeps it for a socket bound to an explicit port).
guest_udpskipped the check on Windows.Test:
core/libs/tests/GuestUdp.cpp(existing check, now run on Windows).Fix branch: https://github.com/xXPBSXx/AnyPS5/tree/fix/udp-disconnect-clears-local-address
AI-assisted (Claude Code).