]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip/ip6tunnel: reset encap limit flag on change
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Wed, 14 Nov 2012 15:29:25 +0000 (16:29 +0100)
committerStephen Hemminger <shemminger@vyatta.com>
Fri, 16 Nov 2012 16:15:39 +0000 (08:15 -0800)
Flag IP6_TNL_F_IGN_ENCAP_LIMIT is set when encaplimit is none, but it was not
removed if encaplimit was set on update (ip tunnel change).

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
ip/ip6tunnel.c

index b23377a678157abb594664963b685831d11ef983..7aaac61b3a53a53efad9643c52c5d40b48e12bf3 100644 (file)
@@ -157,6 +157,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm *p)
                                if (get_u8(&uval, *argv, 0) < -1)
                                        invarg("invalid ELIM", *argv);
                                p->encap_limit = uval;
+                               p->flags &= ~IP6_TNL_F_IGN_ENCAP_LIMIT;
                        }
                } else if (strcmp(*argv, "hoplimit") == 0 ||
                           strcmp(*argv, "ttl") == 0 ||