]> git.ipfire.org Git - thirdparty/bind9.git/commit
Split reusing the addr/port and load-balancing socket options
authorOndřej Surý <ondrej@sury.org>
Mon, 5 Oct 2020 11:14:04 +0000 (13:14 +0200)
committerOndřej Surý <ondrej@sury.org>
Mon, 5 Oct 2020 14:19:23 +0000 (16:19 +0200)
commitccd2902a02d4a4df8b041cbedf7b6a472ded2f1c
treee4ac30d7892e826a928643bab1bb408183be4edb
parent5cff119533e3ca2cf69375466bd83b761fe47fa9
Split reusing the addr/port and load-balancing socket options

The SO_REUSEADDR, SO_REUSEPORT and SO_REUSEPORT_LB has different meaning
on different platform. In this commit, we split the function to set the
reuse of address/port and setting the load-balancing into separate
functions.

The libuv library already have multiplatform support for setting
SO_REUSEADDR and SO_REUSEPORT that allows binding to the same address
and port, but unfortunately, when used after the load-balancing socket
options have been already set, it overrides the previous setting, so we
need our own helper function to enable the SO_REUSEADDR/SO_REUSEPORT
first and then enable the load-balancing socket option.

(cherry picked from commit fd975a551dc23b18c2a63105c0b2bb9cf0015021)
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/udp.c