lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4AF662CA.3010208@gmail.com>
Date:	Sun, 08 Nov 2009 07:18:50 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Stephen Hemminger <shemminger@...tta.com>
CC:	"David S. Miller" <davem@...emloft.net>,
	Linux Netdev List <netdev@...r.kernel.org>
Subject: [PATCH iproute2] libnetlink: fix rtnl_send_check()

We currently cannot flush more than ~64 addresses on a device, with
strange status.

# ip -stats addr flush dev eth3
Failed to send flush request: Success
Flush terminated

Problem is in rtnl_send_check(), where a return -1; is misplaced.

After patch, we can flush 64000 addresses without any problem.

# ip -stats addr flush dev eth3

*** Round 1, deleting 32338 addresses ***

*** Round 2, deleting 16168 addresses ***

*** Round 3, deleting 8082 addresses ***

*** Round 4, deleting 4058 addresses ***

*** Round 5, deleting 2028 addresses ***

*** Round 6, deleting 918 addresses ***

*** Round 7, deleting 278 addresses ***

*** Round 8, deleting 130 addresses ***
*** Flush is complete after 8 rounds ***


Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
---
diff --git a/lib/libnetlink.c b/lib/libnetlink.c
index b68e2fd..100dd40 100644
--- a/lib/libnetlink.c
+++ b/lib/libnetlink.c
@@ -137,8 +137,8 @@ int rtnl_send_check(struct rtnl_handle *rth, const char *buf, int len)
 				fprintf(stderr, "ERROR truncated\n");
 			else 
 				errno = -err->error;
+			return -1;
 		}
-		return -1;
 	}
 
 	return 0;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists