netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Latest iproute2 breaks "ip route get" command
@ 2010-08-08 19:33 Andreas Henriksson
  2010-08-08 19:31 ` Fabio Comolli
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Henriksson @ 2010-08-08 19:33 UTC (permalink / raw)
  To: Fabio Comolli, Ulrich Weber; +Cc: netdev

> The following logs should explain the problem. In short, the "ip route
> get" command with iproute2 v. 2.6.35 does not output anything (and
> exits with a 0). This breaks (for example) vpnc.

Seems to be caused by:

http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=commitdiff;h=447928279c88b6581ae4cdc1b5ac0a9e755aff64

Have no idea if this is the correct fix, but it seemed like a likely typo
based on the changes in the above commit and that this brings the output back:


diff --git a/ip/iproute.c b/ip/iproute.c
index 711576e..86c7ab7 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -160,7 +160,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 	if (r->rtm_family == AF_INET6 && table != RT_TABLE_MAIN)
 		ip6_multiple_tables = 1;
 
-	if (filter.cloned == !(r->rtm_flags&RTM_F_CLONED))
+	if (filter.cloned && !(r->rtm_flags&RTM_F_CLONED))
 		return 0;
 
 	if (r->rtm_family == AF_INET6 && !ip6_multiple_tables) {



(PS. Sorry for not properly replying in thread, but todays mailing list
archives seems to be extremely afraid of exposing any real mail headers
making it hard to reply properly without having received the original mail.)

-- 
Andreas Henriksson

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-08-23 15:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-08 19:33 Latest iproute2 breaks "ip route get" command Andreas Henriksson
2010-08-08 19:31 ` Fabio Comolli
2010-08-08 19:52   ` Andreas Henriksson
2010-08-12  9:02     ` Ulrich Weber
2010-08-12  9:05     ` [PATCH] iproute2: dont filter cached routes on iproute_get Ulrich Weber
2010-08-12  9:12       ` Fabio Comolli
2010-08-12  9:20         ` Ulrich Weber
2010-08-12 18:58           ` Fabio Comolli
2010-08-23 15:15       ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).