netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ip route: don't implicitly filter address family
@ 2011-07-15 18:38 Dan McGee
  2011-08-31 17:48 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Dan McGee @ 2011-07-15 18:38 UTC (permalink / raw)
  To: netdev; +Cc: Dan McGee

When looking at the output of 'ip route show' on an IPv6 capable
machine, the default output doesn't show IPv6 routes. This is unlike any
other ip subcommand, which show all address families by default.
Furthermore, the behavior is totally bogus for different permutations of
the command:

    ip route show : will show IPv4, not show IPv6
	ip route show table all : will show IPv4 and IPv6
	ip route -f link show : will show IPv4 and IPv6

Rectify this behavior by removing some 2004 code that tries to munge the
address family if it is unspecified and fails bad at guessing the user's
intention.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
 ip/iproute.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/ip/iproute.c b/ip/iproute.c
index ca09029..4458d9c 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -1236,9 +1236,6 @@ static int iproute_list_flush_or_save(int argc, char **argv, int action)
 		argc--; argv++;
 	}
 
-	if (do_ipv6 == AF_UNSPEC && filter.tb)
-		do_ipv6 = AF_INET;
-
 	ll_init_map(&rth);
 
 	if (id || od)  {
-- 
1.7.6


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

* Re: [PATCH] ip route: don't implicitly filter address family
  2011-07-15 18:38 [PATCH] ip route: don't implicitly filter address family Dan McGee
@ 2011-08-31 17:48 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2011-08-31 17:48 UTC (permalink / raw)
  To: Dan McGee; +Cc: netdev

On Fri, 15 Jul 2011 13:38:33 -0500
Dan McGee <dan@archlinux.org> wrote:

> When looking at the output of 'ip route show' on an IPv6 capable
> machine, the default output doesn't show IPv6 routes. This is unlike any
> other ip subcommand, which show all address families by default.
> Furthermore, the behavior is totally bogus for different permutations of
> the command:
> 
>     ip route show : will show IPv4, not show IPv6
> 	ip route show table all : will show IPv4 and IPv6
> 	ip route -f link show : will show IPv4 and IPv6
> 
> Rectify this behavior by removing some 2004 code that tries to munge the
> address family if it is unspecified and fails bad at guessing the user's
> intention.
> 
> Signed-off-by: Dan McGee <dan@archlinux.org>
> ---
>  ip/iproute.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/ip/iproute.c b/ip/iproute.c
> index ca09029..4458d9c 100644
> --- a/ip/iproute.c
> +++ b/ip/iproute.c
> @@ -1236,9 +1236,6 @@ static int iproute_list_flush_or_save(int argc, char **argv, int action)
>  		argc--; argv++;
>  	}
>  
> -	if (do_ipv6 == AF_UNSPEC && filter.tb)
> -		do_ipv6 = AF_INET;
> -
>  	ll_init_map(&rth);
>  
>  	if (id || od)  {

No, this will change the output for unsuspecting users and likely
break their scripts.

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

end of thread, other threads:[~2011-08-31 17:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-15 18:38 [PATCH] ip route: don't implicitly filter address family Dan McGee
2011-08-31 17:48 ` 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).