Skip to content
Snippets Groups Projects
Commit 43c4c513 authored by David Vasek's avatar David Vasek Committed by Daniel Salzman
Browse files

server: don't use SO_REUSEADDR socket option

After the dynamic worker count reconfiguration has been removed,
there is no need for SO_REUSEADDR option anymore.
parent 37d7bb9f
No related branches found
No related tags found
No related merge requests found
Pipeline #55797 failed
......@@ -166,6 +166,8 @@ static void unlink_unix_socket(const struct sockaddr_storage *addr)
int net_bound_socket(int type, const struct sockaddr_storage *addr, enum net_flags flags)
{
int ret;
/* Create socket. */
int sock = net_unbound_socket(type, addr);
if (sock < 0) {
......@@ -177,13 +179,6 @@ int net_bound_socket(int type, const struct sockaddr_storage *addr, enum net_fla
unlink_unix_socket(addr);
}
/* Reuse old address if taken. */
int ret = sockopt_enable(sock, SOL_SOCKET, SO_REUSEADDR);
if (ret != KNOT_EOK) {
close(sock);
return ret;
}
/* Don't bind IPv4 for IPv6 any address. */
if (addr->ss_family == AF_INET6) {
ret = sockopt_enable(sock, IPPROTO_IPV6, IPV6_V6ONLY);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment