You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
950 B

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