git: DragonFly_RELEASE_6_4 kernel - Fix auto port assignment collision in network code
Aaron LI
aly at crater.dragonflybsd.org
Tue Mar 18 18:12:13 PDT 2025
commit ddada0bfd2e9070501a181ea33748e30b764710c
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Tue Nov 5 08:05:14 2024 -0800
kernel - Fix auto port assignment collision in network code
* When the SO_REUSEADDR or SO_REUSEPORT socket option is set on a
socket undergoing automatic lport assignment, the auto network port
assignment code in the kernel improperly ignores collisions against
ports assigned to wildcard sockets and may assign the same port. This
causes later connect() calls to fail.
* Can cause gdb services to sometimes fail to connect.
* Fixed by ignoring the options for the purposes of finding an unused
port.
Reported-by: Sergey Zigachev (servik)
Summary of changes:
sys/netinet/in_pcb.c | 7 +++++++
sys/netinet6/in6_src.c | 10 ++++++++++
2 files changed, 17 insertions(+)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ddada0bfd2e9070501a181ea33748e30b764710c
--
DragonFly BSD source repository
More information about the Commits
mailing list