Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions system-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -3665,6 +3665,7 @@ static int system_add_ip6_tunnel(const char *name, const unsigned int link,
struct ifinfomsg ifi = { .ifi_family = AF_UNSPEC };
struct blob_attr *cur;
int ret = 0, ttl = 0;
uint32_t tun_flags = IP6_TNL_F_IGN_ENCAP_LIMIT;

if (!nlm)
return -1;
Expand Down Expand Up @@ -3716,7 +3717,6 @@ 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));
Expand Down Expand Up @@ -3805,10 +3805,10 @@ 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_put_u32(nlm, IFLA_IPTUN_FLAGS, tun_flags | IP6_TNL_F_USE_ORIG_TCLASS);

nla_nest_end(nlm, infodata);
nla_nest_end(nlm, linkinfo);

Expand Down