]> err.no Git - systemd/commitdiff
socket: always use SO_{RCV,SND}BUFFORCE to allow larger values
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 20 May 2011 16:41:44 +0000 (18:41 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 20 May 2011 16:43:05 +0000 (18:43 +0200)
src/socket.c

index 1020c94de233ff390d6edfb2c9de1348623e1a56..c0139587e38b98d8e7beeafbd1a97f5e667204b3 100644 (file)
@@ -663,14 +663,14 @@ static void socket_apply_socket_options(Socket *s, int fd) {
 
         if (s->receive_buffer > 0) {
                 int value = (int) s->receive_buffer;
-                if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &value, sizeof(value)) < 0)
-                        log_warning("SO_RCVBUF failed: %m");
+                if (setsockopt(fd, SOL_SOCKET, SO_RCVBUFFORCE, &value, sizeof(value)) < 0)
+                        log_warning("SO_RCVBUFFORCE failed: %m");
         }
 
         if (s->send_buffer > 0) {
                 int value = (int) s->send_buffer;
-                if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &value, sizeof(value)) < 0)
-                        log_warning("SO_SNDBUF failed: %m");
+                if (setsockopt(fd, SOL_SOCKET, SO_SNDBUFFORCE, &value, sizeof(value)) < 0)
+                        log_warning("SO_SNDBUFFORCE failed: %m");
         }
 
         if (s->mark >= 0)