sticky-sockets: do not use SO_REUSEADDR
This makes little sense for unicast UDP sockets. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
7e506135f7
commit
66ed611bd0
contrib/sticky-sockets
|
@ -195,10 +195,6 @@ int magic_create_sock4(uint16_t listen_port)
|
|||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
ret = setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on));
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
@ -228,10 +224,6 @@ int magic_create_sock6(uint16_t listen_port)
|
|||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
ret = setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on));
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
|
Loading…
Reference in New Issue