summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--udev_libc_wrapper.h4
-rw-r--r--udevd.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/udev_libc_wrapper.h b/udev_libc_wrapper.h
index 9dd22175cd..6f8c8f24c7 100644
--- a/udev_libc_wrapper.h
+++ b/udev_libc_wrapper.h
@@ -53,6 +53,10 @@
#define NETLINK_KOBJECT_UEVENT 15
#endif
+#ifndef SO_RCVBUFFORCE
+#define SO_RCVBUFFORCE 33
+#endif
+
#ifdef __KLIBC__
static inline int clearenv(void)
{
diff --git a/udevd.c b/udevd.c
index 5974d14e8e..aaf80a2314 100644
--- a/udevd.c
+++ b/udevd.c
@@ -686,7 +686,7 @@ static void reap_sigchilds(void)
static int init_udevd_socket(void)
{
struct sockaddr_un saddr;
- const int buffersize = 1024 * 1024;
+ const int buffersize = 16 * 1024 * 1024;
socklen_t addrlen;
const int feature_on = 1;
int retval;
@@ -704,7 +704,7 @@ static int init_udevd_socket(void)
}
/* set receive buffersize */
- setsockopt(udevd_sock, SOL_SOCKET, SO_RCVBUF, &buffersize, sizeof(buffersize));
+ setsockopt(udevd_sock, SOL_SOCKET, SO_RCVBUFFORCE, &buffersize, sizeof(buffersize));
/* the bind takes care of ensuring only one copy running */
retval = bind(udevd_sock, (struct sockaddr *) &saddr, addrlen);
@@ -723,7 +723,7 @@ static int init_udevd_socket(void)
static int init_uevent_netlink_sock(void)
{
struct sockaddr_nl snl;
- const int buffersize = 1024 * 1024;
+ const int buffersize = 16 * 1024 * 1024;
int retval;
memset(&snl, 0x00, sizeof(struct sockaddr_nl));
@@ -738,7 +738,7 @@ static int init_uevent_netlink_sock(void)
}
/* set receive buffersize */
- setsockopt(uevent_netlink_sock, SOL_SOCKET, SO_RCVBUF, &buffersize, sizeof(buffersize));
+ setsockopt(uevent_netlink_sock, SOL_SOCKET, SO_RCVBUFFORCE, &buffersize, sizeof(buffersize));
retval = bind(uevent_netlink_sock, (struct sockaddr *) &snl,
sizeof(struct sockaddr_nl));