summaryrefslogtreecommitdiff
path: root/src/basic/socket-util.h
diff options
context:
space:
mode:
authorChristos Trochalakis <yatiohi@ideopolis.gr>2015-07-01 14:39:53 +0300
committerChristos Trochalakis <yatiohi@ideopolis.gr>2015-07-01 16:43:03 +0300
commit54255c64e6d223deb7d3863e426e78c443fda37c (patch)
treec4236e9de47603b9e90f4a3a0b25b272525a8755 /src/basic/socket-util.h
parent52a321d839b366d40fdd72bbb6c494016fa3d608 (diff)
socket: Set SO_REUSEPORT before bind()
bind() fails if it is called before setting SO_REUSEPORT and another process is already binded to the same addess. A new reuse_port option has been introduced to socket_address_listen() to set the option as part of socket initialization.
Diffstat (limited to 'src/basic/socket-util.h')
-rw-r--r--src/basic/socket-util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/socket-util.h b/src/basic/socket-util.h
index 538cf59174..6b0ce7836f 100644
--- a/src/basic/socket-util.h
+++ b/src/basic/socket-util.h
@@ -80,6 +80,7 @@ int socket_address_listen(
int backlog,
SocketAddressBindIPv6Only only,
const char *bind_to_device,
+ bool reuse_port,
bool free_bind,
bool transparent,
mode_t directory_mode,