* [PATCH] iproute2: Fix no default display of ip4ip6 tunnels
@ 2009-02-19 6:36 Srivats P
2009-02-19 16:52 ` Stephen Hemminger
0 siblings, 1 reply; 4+ messages in thread
From: Srivats P @ 2009-02-19 6:36 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev@vger.kernel.org
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;
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."
**********************************************************************
---------------------------------------------------------------------
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] iproute2: Fix no default display of ip4ip6 tunnels
2009-02-19 6:36 [PATCH] iproute2: Fix no default display of ip4ip6 tunnels Srivats P
@ 2009-02-19 16:52 ` Stephen Hemminger
2009-02-20 4:49 ` Srivats P
2009-02-24 8:51 ` Srivats P
0 siblings, 2 replies; 4+ messages in thread
From: Stephen Hemminger @ 2009-02-19 16:52 UTC (permalink / raw)
To: Srivats P; +Cc: netdev@vger.kernel.org
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] iproute2: Fix no default display of ip4ip6 tunnels
2009-02-19 16:52 ` Stephen Hemminger
@ 2009-02-20 4:49 ` Srivats P
2009-02-24 8:51 ` Srivats P
1 sibling, 0 replies; 4+ messages in thread
From: Srivats P @ 2009-02-20 4:49 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev@vger.kernel.org
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."
**********************************************************************
---------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] iproute2: Fix no default display of ip4ip6 tunnels
2009-02-19 16:52 ` Stephen Hemminger
2009-02-20 4:49 ` Srivats P
@ 2009-02-24 8:51 ` Srivats P
1 sibling, 0 replies; 4+ messages in thread
From: Srivats P @ 2009-02-24 8:51 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev@vger.kernel.org
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."
**********************************************************************
---------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-24 8:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-19 6:36 [PATCH] iproute2: Fix no default display of ip4ip6 tunnels Srivats P
2009-02-19 16:52 ` Stephen Hemminger
2009-02-20 4:49 ` Srivats P
2009-02-24 8:51 ` Srivats P
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).