diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2018-09-17 21:41:16 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2018-09-18 16:02:25 +0200 |
commit | 23941d7ef3134de9c89c363896e45a0ea4fbe45b (patch) | |
tree | ed2897f1e03ec6b385cce568d9d0f2ada52c0a42 /system-linux.c | |
parent | 0059335c5b60c5623a894f08a090fdabd618afae (diff) |
system-linux: enable by default ignore encaplimit for ip6 tunnels
Enable ignore encaplimit by default for ip6 tunnels as not all ISPs support
the destination option header containing the tunnel encapsulation limit
resulting into broken map/ds-lite connectivity.
Setting the ignore encaplimit flag by default is a more sane setting as it
avoids user configuation of the encaplimit uci option for ds-lite/map tunnels
in case of broken connectivity.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'system-linux.c')
-rw-r--r-- | system-linux.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/system-linux.c b/system-linux.c index 9cd49d0..9401cd9 100644 --- a/system-linux.c +++ b/system-linux.c @@ -2344,6 +2344,7 @@ static int system_add_ip6_tunnel(const char *name, const unsigned int link, if ((cur = tb[TUNNEL_ATTR_DATA])) { struct blob_attr *tb_data[__IPIP6_DATA_ATTR_MAX]; + uint32_t tun_flags = IP6_TNL_F_IGN_ENCAP_LIMIT; blobmsg_parse(ipip6_data_attr_list.params, __IPIP6_DATA_ATTR_MAX, tb_data, blobmsg_data(cur), blobmsg_len(cur)); @@ -2361,8 +2362,8 @@ static int system_add_ip6_tunnel(const char *name, const unsigned int link, } nla_put_u8(nlm, IFLA_IPTUN_ENCAP_LIMIT, encap_limit); - } else - nla_put_u32(nlm, IFLA_IPTUN_FLAGS, IP6_TNL_F_IGN_ENCAP_LIMIT); + tun_flags &= ~IP6_TNL_F_IGN_ENCAP_LIMIT; + } } #ifdef IFLA_IPTUN_FMR_MAX @@ -2432,6 +2433,8 @@ static int system_add_ip6_tunnel(const char *name, const unsigned int link, nla_nest_end(nlm, fmrs); } #endif + if (tun_flags) + nla_put_u32(nlm, IFLA_IPTUN_FLAGS, tun_flags); } nla_nest_end(nlm, infodata); |