]> git.ipfire.org Git - thirdparty/systemd.git/commit
socket: Set SO_REUSEPORT before bind() 459/head
authorChristos Trochalakis <yatiohi@ideopolis.gr>
Wed, 1 Jul 2015 11:39:53 +0000 (14:39 +0300)
committerChristos Trochalakis <yatiohi@ideopolis.gr>
Wed, 1 Jul 2015 13:43:03 +0000 (16:43 +0300)
commit54255c64e6d223deb7d3863e426e78c443fda37c
treec4236e9de47603b9e90f4a3a0b25b272525a8755
parent52a321d839b366d40fdd72bbb6c494016fa3d608
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.
src/basic/socket-label.c
src/basic/socket-util.h
src/core/socket.c