[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1184179063.16607.9.camel@localhost.localdomain>
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