Patchwork [iproute2,2/3] ip/ip6tunnel: reset encap limit flag on change

login
register
mail settings
Submitter Nicolas Dichtel
Date Nov. 14, 2012, 3:29 p.m.
Message ID <1352906966-12932-2-git-send-email-nicolas.dichtel@6wind.com>
Download mbox | patch
Permalink /patch/198945/
State Accepted
Delegated to: stephen hemminger
Headers show

Comments

Nicolas Dichtel - Nov. 14, 2012, 3:29 p.m.
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 | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index b23377a..7aaac61 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -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 ||