ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
1ff636
From a905a1904792b4d5992add15a5cf396b581c1e36 Mon Sep 17 00:00:00 2001
1ff636
From: Robin Hack <rhack@redhat.com>
1ff636
Date: Mon, 31 Aug 2015 11:45:09 +0200
1ff636
Subject: [PATCH] socket: fix setsockopt call. SOL_SOCKET changed to SOL_TCP.
1ff636
1ff636
Cherry-picked from: 172cfe8714754e1f16fc500e3ed02c4de68de92
1ff636
Resolves: #1135599
1ff636
---
1ff636
 src/core/socket.c | 2 +-
1ff636
 1 file changed, 1 insertion(+), 1 deletion(-)
1ff636
1ff636
diff --git a/src/core/socket.c b/src/core/socket.c
181b3f
index 760de0203..7022e77b5 100644
1ff636
--- a/src/core/socket.c
1ff636
+++ b/src/core/socket.c
1ff636
@@ -833,7 +833,7 @@ static void socket_apply_socket_options(Socket *s, int fd) {
1ff636
 
1ff636
         if (s->keep_alive_cnt) {
1ff636
                 int value = s->keep_alive_cnt;
1ff636
-                if (setsockopt(fd, SOL_SOCKET, TCP_KEEPCNT, &value, sizeof(value)) < 0)
1ff636
+                if (setsockopt(fd, SOL_TCP, TCP_KEEPCNT, &value, sizeof(value)) < 0)
1ff636
                         log_unit_warning(UNIT(s)->id, "TCP_KEEPCNT failed: %m");
1ff636
         }
1ff636