diff options
author | Julia Cartwright <julia@ni.com> | 2018-08-03 19:42:33 -0500 |
---|---|---|
committer | Julia Cartwright <julia@ni.com> | 2018-08-03 19:42:33 -0500 |
commit | fc6990cc892dccae554885b2855ff52a1d4a20b6 (patch) | |
tree | 42367d7d1feeed32583f0aa4798c28831a9c5b64 /net/ipv6/ip6_tunnel.c | |
parent | 3bafcb69f5f2f53a97b12e31fe401efea214a9dc (diff) | |
parent | 5b90d559d4d5c8fd2127013666014595caa53ae2 (diff) | |
download | linux-rt-fc6990cc892dccae554885b2855ff52a1d4a20b6.tar.gz |
Merge tag 'v4.9.104' into v4.9-rt
This is the 4.9.104 stable release
Diffstat (limited to 'net/ipv6/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 417af5ea2509..c7b202c1720d 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -1972,14 +1972,14 @@ static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev, { struct net *net = dev_net(dev); struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); - struct ip6_tnl *nt, *t; struct ip_tunnel_encap ipencap; + struct ip6_tnl *nt, *t; + int err; nt = netdev_priv(dev); if (ip6_tnl_netlink_encap_parms(data, &ipencap)) { - int err = ip6_tnl_encap_setup(nt, &ipencap); - + err = ip6_tnl_encap_setup(nt, &ipencap); if (err < 0) return err; } @@ -1995,7 +1995,11 @@ static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev, return -EEXIST; } - return ip6_tnl_create2(dev); + err = ip6_tnl_create2(dev); + if (!err && tb[IFLA_MTU]) + ip6_tnl_change_mtu(dev, nla_get_u32(tb[IFLA_MTU])); + + return err; } static int ip6_tnl_changelink(struct net_device *dev, struct nlattr *tb[], |