diff options
author | Shawn Landden <shawn@churchofgit.com> | 2013-11-16 13:18:13 -0800 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-11-17 17:41:35 -0500 |
commit | f0511bd7e3d591383485a36ddcb764abe74b1939 (patch) | |
tree | f8142b4939c3d5bfb712ff871f006b86645d91c9 | |
parent | e55001ebba6f6ad7d63db249f7bf93f25be12acd (diff) |
core/socket: fix SO_REUSEPORT
-rw-r--r-- | src/core/load-fragment-gperf.gperf.m4 | 1 | ||||
-rw-r--r-- | src/core/socket.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 index e3025d247b..b64fdc9dcb 100644 --- a/src/core/load-fragment-gperf.gperf.m4 +++ b/src/core/load-fragment-gperf.gperf.m4 @@ -210,6 +210,7 @@ Socket.Broadcast, config_parse_bool, 0, Socket.PassCredentials, config_parse_bool, 0, offsetof(Socket, pass_cred) Socket.PassSecurity, config_parse_bool, 0, offsetof(Socket, pass_sec) Socket.TCPCongestion, config_parse_string, 0, offsetof(Socket, tcp_congestion) +Socket.ReusePort, config_parse_bool, 0, offsetof(Socket, reuseport) Socket.MessageQueueMaxMessages, config_parse_long, 0, offsetof(Socket, mq_maxmsg) Socket.MessageQueueMessageSize, config_parse_long, 0, offsetof(Socket, mq_msgsize) Socket.Service, config_parse_socket_service, 0, 0 diff --git a/src/core/socket.c b/src/core/socket.c index f505e4f969..751f20bdca 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -771,7 +771,7 @@ static void socket_apply_socket_options(Socket *s, int fd) { if (s->reuseport) { int b = s->reuseport; - if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &b, sizeof(b))) + if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &b, sizeof(b)) < 0) log_warning_unit(UNIT(s)->id, "SO_REUSEPORT failed: %m"); } |