Package: keepalived
Version: 1:1.2.2-3
Severity: normal

Dear Maintainer,

 When configuring keepalived with more then 31 VRRP_Interface stanzas, I 
usually received this message in logs:

        Sep 16 14:16:28 fw Keepalived_vrrp[7647]: Netlink: Received message 
overrun

which leads later to:
        Sep 16 14:16:43 fw Keepalived_vrrp[7647]: Kernel is reporting: 
interface vrrp.255 DOWN
        Sep 16 14:16:43 fw Keepalived_vrrp[7647]: VRRP_Instance(VI_303) Now in 
FAULT state
(which is untrue, interface is UP, and kernel reports it as such)

 Problem persists with keeepalived 1.2.8

 Problem might be solved by increasing netlink buffers, like in attached patch.


-- System Information:
Debian Release: 7.1
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable'), (500, 'oldstable')
Architecture: i386 (x86_64)

Kernel: Linux 3.10.5 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/dash

Versions of packages keepalived depends on:
ii  iproute      20120521-3+b3
ii  ipvsadm      1:1.26-1
ii  libc6        2.13-38
ii  libnl1       1.1-7
ii  libpopt0     1.16-7
ii  libssl1.0.0  1.0.1e-2

keepalived recommends no packages.

keepalived suggests no packages.

-- no debconf information
diff --git a/keepalived/vrrp/vrrp_netlink.c b/keepalived/vrrp/vrrp_netlink.c
index f64d8fe..fc29d55 100644
--- a/keepalived/vrrp/vrrp_netlink.c
+++ b/keepalived/vrrp/vrrp_netlink.c
@@ -53,6 +53,7 @@ netlink_socket(nl_handle_t *nl, unsigned long groups)
 {
        socklen_t addr_len;
        int ret;
+       int buffsize = 65536;
 
        memset(nl, 0, sizeof (*nl));
 
@@ -101,6 +102,11 @@ netlink_socket(nl_handle_t *nl, unsigned long groups)
        }
 
        nl->seq = time(NULL);
+/* increase buffer sizes, increasing net.core.rmem_max and net.core.wmem_max might be neccessary */
+
+          setsockopt(nl->fd, SOL_SOCKET, SO_RCVBUF, &buffsize, sizeof(buffsize));
+          setsockopt(nl->fd, SOL_SOCKET, SO_SNDBUF, &buffsize, sizeof(buffsize));
+
 
        return ret;
 }
@@ -261,7 +267,8 @@ netlink_parse_info(int (*filter) (struct sockaddr_nl *, struct nlmsghdr *),
                                continue;
                        if (errno == EWOULDBLOCK || errno == EAGAIN)
                                break;
-                       log_message(LOG_INFO, "Netlink: Received message overrun");
+                       log_message(LOG_INFO, "Netlink: Received message overrun : (%s)",
+                               strerror(errno));
                        continue;
                }
 

Reply via email to