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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 11 Jul 2007 11:37:43 -0700
From:	Sridhar Samudrala <sri@...ibm.com>
To:	Stephen Hemminger <shemminger@...ux-foundation.org>
Cc:	netdev@...r.kernel.org
Subject: [PATCH] IPROUTE2: Fix bug  in display of ipv6 cloned/cached routes

This patch fixes a bug in the 'ip' command to display 
IPv6 cloned routes.
  ip -6 route ls cache
returns empty even when there are cloned routes because of
of a missing else in print_route() routine.

Thanks
Sridhar

Signed-off-by: Sridhar Samudrala <sri@...ibm.com>	

diff --git a/ip/iproute.c b/ip/iproute.c
index 6fe4a70..08feceb 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -176,18 +176,19 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 		if (filter.cloned) {
 			if (!(r->rtm_flags&RTM_F_CLONED))
 				return 0;
-		}
-		if (filter.tb) {
-			if (r->rtm_flags&RTM_F_CLONED)
-				return 0;
-			if (filter.tb == RT_TABLE_LOCAL) {
-				if (r->rtm_type != RTN_LOCAL)
+		} else {
+			if (filter.tb) {
+				if (r->rtm_flags&RTM_F_CLONED)
 					return 0;
-			} else if (filter.tb == RT_TABLE_MAIN) {
-				if (r->rtm_type == RTN_LOCAL)
+				if (filter.tb == RT_TABLE_LOCAL) {
+					if (r->rtm_type != RTN_LOCAL)
+						return 0;
+				} else if (filter.tb == RT_TABLE_MAIN) {
+					if (r->rtm_type == RTN_LOCAL)
+						return 0;
+				} else {
 					return 0;
-			} else {
-				return 0;
+				}
 			}
 		}
 	} else {


-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ