]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ipaddress: fix ipaddr_flush for Linux >= 3.1
authorPhil Sutter <phil@nwl.cc>
Tue, 24 Nov 2015 14:31:02 +0000 (15:31 +0100)
committerStephen Hemminger <shemming@brocade.com>
Sun, 29 Nov 2015 19:47:29 +0000 (11:47 -0800)
Linux version 3.1 introduced a consistency check for netlink dumps in
commit 670dc28 ("netlink: advertise incomplete dumps"). This bites
iproute2 when flushing more addresses than can fit into a single
RTM_GETADDR response. To silence the spurious error message "Dump was
interrupted and may be inconsistent.", advise rtnl_dump_filter_l() to
not care about NLM_F_DUMP_INTR.

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

index 26e91c9b5d6f72fe174970d76439641c8fafb262..9811eb4c70dfb6b6dd4d00d0b5cde0d9bce00a19 100644 (file)
@@ -1403,7 +1403,8 @@ static int ipaddr_flush(void)
                        exit(1);
                }
                filter.flushed = 0;
-               if (rtnl_dump_filter(&rth, print_addrinfo, stdout) < 0) {
+               if (rtnl_dump_filter_nc(&rth, print_addrinfo,
+                                       stdout, NLM_F_DUMP_INTR) < 0) {
                        fprintf(stderr, "Flush terminated\n");
                        exit(1);
                }