]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip6tunnel: Fix no default display of ip4ip6 tunnels
authorSrivats P <srivats.p@conexant.com>
Fri, 27 Mar 2009 18:17:26 +0000 (11:17 -0700)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Fri, 27 Mar 2009 18:17:26 +0000 (11:17 -0700)
"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'.

ip/ip6tunnel.c

index 8421983bbb832c627ad150c335f4240fbf44d7e4..8852a67a38f343b84153c2353d8cdc8462434159 100644 (file)
@@ -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;  /* default to any */
 
         if (parse_args(argc, argv, &p) < 0)
                 return -1;