diff mbox

iproute2: Fix no default display of ip4ip6 tunnels

Message ID F33E0C3C2876A544ABD34CFBE345A4A40211E426D0@NDMBX01.bbnet.ad
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Srivats P Feb. 19, 2009, 6:36 a.m. UTC
From: Srivats P. <srivats.p@conexant.com>

"ip -6 tunnel show" displays only ip6ip6 tunnels not ip4ip6 tunnels - it should display all irrespective of proto.

This is because the default tunnel proto is initialized to IPPROTO_IPV6 in ip6_tnl_parm_init() which is fine for a 'add' command but not for 'show'. This patch overrides proto with 0 signifying 'mode any' as the default in case of a 'show'.

Signed-off-by: Srivats P. <srivats.p@conexant.com>
---


Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer **************************** 

"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you." 

********************************************************************** 

---------------------------------------------------------------------

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

stephen hemminger Feb. 19, 2009, 4:52 p.m. UTC | #1
On Thu, 19 Feb 2009 12:06:33 +0530
"Srivats P" <Srivats.P@conexant.com> wrote:

> From: Srivats P. <srivats.p@conexant.com>
> 
> "ip -6 tunnel show" displays only ip6ip6 tunnels not ip4ip6 tunnels - it should display all irrespective of proto.
> 
> This is because the default tunnel proto is initialized to IPPROTO_IPV6 in ip6_tnl_parm_init() which is fine for a 'add' command but not for 'show'. This patch overrides proto with 0 signifying 'mode any' as the default in case of a 'show'.
> 
> Signed-off-by: Srivats P. <srivats.p@conexant.com>
> ---
> 
> diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
> index 8421983..0122974 100644
> --- a/ip/ip6tunnel.c
> +++ b/ip/ip6tunnel.c
> @@ -335,6 +335,7 @@ static int do_show(int argc, char **argv)
>          struct ip6_tnl_parm p;
> 
>         ip6_tnl_parm_init(&p, 0);
> +       p.proto = 0;
> 
>          if (parse_args(argc, argv, &p) < 0)
>                  return -1;
> 

it is possible to see all with
	ip -6 tunnel show mode all
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Srivats P Feb. 20, 2009, 4:49 a.m. UTC | #2
Stephen,

>it is possible to see all with
>	ip -6 tunnel show mode all

I guess you meant "mode any" instead of "mode all". And yes, you are right - "mode any" does display all tunnels.

However the equivalent INET4 command - "ip tunnel show" displays all tunnels (gre/ipip/sit) irrespective of mode and from a end user point of view he would probably expect the same behaviour with the INET6 tunnels without having to specify "mode any"

If you agree, I'll submit a replacement patch for my earlier one which does the same thing.

Regards,
Srivats


Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer **************************** 

"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you." 

********************************************************************** 

---------------------------------------------------------------------

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Srivats P Feb. 24, 2009, 8:51 a.m. UTC | #3
Stephen,

Awaiting your response.

Regards,
Srivats

-----Original Message-----
From: Srivats P 
Sent: Friday, February 20, 2009 10:20 AM
To: 'Stephen Hemminger'
Cc: netdev@vger.kernel.org
Subject: RE: [PATCH] iproute2: Fix no default display of ip4ip6 tunnels

Stephen,

>it is possible to see all with
>	ip -6 tunnel show mode all

I guess you meant "mode any" instead of "mode all". And yes, you are right - "mode any" does display all tunnels.

However the equivalent INET4 command - "ip tunnel show" displays all tunnels (gre/ipip/sit) irrespective of mode and from a end user point of view he would probably expect the same behaviour with the INET6 tunnels without having to specify "mode any"

If you agree, I'll submit a replacement patch for my earlier one which does the same thing.

Regards,
Srivats


Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer **************************** 

"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you." 

********************************************************************** 

---------------------------------------------------------------------

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index 8421983..0122974 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -335,6 +335,7 @@  static int do_show(int argc, char **argv)
         struct ip6_tnl_parm p;

        ip6_tnl_parm_init(&p, 0);
+       p.proto = 0;

         if (parse_args(argc, argv, &p) < 0)
                 return -1;