]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
libnetlink: Double the dump buffer size
authorPhil Sutter <phil@nwl.cc>
Fri, 4 Mar 2016 18:57:28 +0000 (19:57 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 6 Mar 2016 20:51:18 +0000 (12:51 -0800)
There have been reports about 'ip addr' printing "Message truncated" on
systems with large numbers of VFs. Although I haven't been able to get
my hands on hardware suitable to reproduce this, increasing the dump
buffer has been reported to resolve the issue. For want of a better
idea, just double the buffer size to 32k.

Feels like this opportunistic buffer size selection is rather
workarounding a design flaw in libnetlink or maybe even the netlink
protocol itself.

Signed-off-by: Phil Sutter <phil@nwl.cc>
lib/libnetlink.c

index d6b5fd3e8a493940df0e91e8305f655d1e59fb8e..245c4ca216753d343e4b5cafa7a7d9d7f4f3463b 100644 (file)
@@ -223,7 +223,7 @@ int rtnl_dump_filter_l(struct rtnl_handle *rth,
                .msg_iov = &iov,
                .msg_iovlen = 1,
        };
-       char buf[16384];
+       char buf[32768];
        int dump_intr = 0;
 
        iov.iov_base = buf;