git: kernel - Add kern.ipc.soaccept_reuse and set default to 1
Matthew Dillon
dillon at crater.dragonflybsd.org
Wed May 1 11:35:56 PDT 2019
commit 2d5847e29ce41ed5553ed7b2c2bebfc938618f33
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Wed May 1 11:31:50 2019 -0700
kernel - Add kern.ipc.soaccept_reuse and set default to 1
* This feature, enabled by default, allows a service listening on
a socket to be killed and restarted without causing
"bind: Address already in use" errors due to accepted connections still
being present.
* The accepted connections may still be present either because they
are still in active use (though typically this is not the case when
a service is killed... its children also get killed). But also, more
importantly, if the sockets are still present due to lingering on a
TCP timeout.
In both of these situations we allow bind() to ignore matches against
accepted connections. This allows a service to be restared without
having to set SO_REUSEADDR (for example named/bind generally does not
set SO_REUSEADDR and restarting can be a pain).
Summary of changes:
sys/kern/uipc_socket2.c | 20 +++++++++++++-------
sys/netinet/in_pcb.c | 15 ++++++++++++---
sys/sys/socketvar.h | 1 +
3 files changed, 26 insertions(+), 10 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2d5847e29ce41ed5553ed7b2c2bebfc938618f33
--
DragonFly BSD source repository
More information about the Commits
mailing list