diff mbox

[iproute,v3,3/5] ipaddress: fix ipaddr_flush for Linux >= 3.1

Message ID 1448375464-12145-4-git-send-email-phil@nwl.cc
State Accepted, archived
Delegated to: stephen hemminger
Headers show

Commit Message

Phil Sutter Nov. 24, 2015, 2:31 p.m. UTC
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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Sergei Shtylyov Nov. 25, 2015, 1:36 p.m. UTC | #1
Hello.

On 11/24/2015 5:31 PM, Phil Sutter wrote:

> Linux version 3.1 introduced a consistency check for netlink dumps in
> commit 670dc28 ("netlink: advertise incomplete dumps"). This bites

    Need 12-digit SHA1 here, scripts/checkpatch.pl checks this now.

> 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>
[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Phil Sutter Nov. 25, 2015, 2:32 p.m. UTC | #2
Hi Sergei,

On Wed, Nov 25, 2015 at 04:36:04PM +0300, Sergei Shtylyov wrote:
> On 11/24/2015 5:31 PM, Phil Sutter wrote:
> 
> > Linux version 3.1 introduced a consistency check for netlink dumps in
> > commit 670dc28 ("netlink: advertise incomplete dumps"). This bites
> 
>     Need 12-digit SHA1 here, scripts/checkpatch.pl checks this now.

Dejavu! [1]

Again, this is luckily just iproute2. But thanks again for the reminder,
I've set 'core.abbrev = 13' now globally on all my machines, that should
hold for a while. :)

Cheers, Phil

[1]: https://www.mail-archive.com/netdev@vger.kernel.org/msg86385.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov Nov. 25, 2015, 2:40 p.m. UTC | #3
Hello.

On 11/25/2015 5:32 PM, Phil Sutter wrote:

>> On 11/24/2015 5:31 PM, Phil Sutter wrote:
>>
>>> Linux version 3.1 introduced a consistency check for netlink dumps in
>>> commit 670dc28 ("netlink: advertise incomplete dumps"). This bites
>>
>>      Need 12-digit SHA1 here, scripts/checkpatch.pl checks this now.

> Dejavu! [1]

    Oh, indeed! Sorry about that, don't remember already. :-)

> Again, this is luckily just iproute2. But thanks again for the reminder,

     Yeah, I didn't look at the subject too closely... :-/

> I've set 'core.abbrev = 13' now globally on all my machines, that should
> hold for a while. :)

> Cheers, Phil
>
> [1]: https://www.mail-archive.com/netdev@vger.kernel.org/msg86385.html

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 26e91c9..9811eb4 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -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);
 		}