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