]> git.baikalelectronics.ru Git - kernel.git/commitdiff
vrf: sit mtu should not be updated when vrf netdev is the link
authorStephen Suryaputra <ssuryaextr@gmail.com>
Mon, 6 May 2019 19:00:01 +0000 (15:00 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 May 2019 19:19:19 +0000 (12:19 -0700)
VRF netdev mtu isn't typically set and have an mtu of 65536. When the
link of a tunnel is set, the tunnel mtu is changed from 1480 to the link
mtu minus tunnel header. In the case of VRF netdev is the link, then the
tunnel mtu becomes 65516. So, fix it by not setting the tunnel mtu in
this case.

Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/sit.c

index b2109b74857d053f52b06c42698cc393d5838609..971d60bf964009d70b4a59b6876f8ac827ebde2a 100644 (file)
@@ -1084,7 +1084,7 @@ static void ipip6_tunnel_bind_dev(struct net_device *dev)
        if (!tdev && tunnel->parms.link)
                tdev = __dev_get_by_index(tunnel->net, tunnel->parms.link);
 
-       if (tdev) {
+       if (tdev && !netif_is_l3_master(tdev)) {
                int t_hlen = tunnel->hlen + sizeof(struct iphdr);
 
                dev->hard_header_len = tdev->hard_header_len + sizeof(struct iphdr);