]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.177/vrf-sit-mtu-should-not-be-updated-when-vrf-netdev-is-the-link.patch
Fix up backported ptrace patch
[thirdparty/kernel/stable-queue.git] / releases / 4.9.177 / vrf-sit-mtu-should-not-be-updated-when-vrf-netdev-is-the-link.patch
CommitLineData
ff38683c
GKH
1From foo@baz Wed 15 May 2019 09:45:15 AM CEST
2From: Stephen Suryaputra <ssuryaextr@gmail.com>
3Date: Mon, 6 May 2019 15:00:01 -0400
4Subject: vrf: sit mtu should not be updated when vrf netdev is the link
5
6From: Stephen Suryaputra <ssuryaextr@gmail.com>
7
8[ Upstream commit ff6ab32bd4e073976e4d8797b4d514a172cfe6cb ]
9
10VRF netdev mtu isn't typically set and have an mtu of 65536. When the
11link of a tunnel is set, the tunnel mtu is changed from 1480 to the link
12mtu minus tunnel header. In the case of VRF netdev is the link, then the
13tunnel mtu becomes 65516. So, fix it by not setting the tunnel mtu in
14this case.
15
16Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
17Reviewed-by: David Ahern <dsahern@gmail.com>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20---
21 net/ipv6/sit.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24--- a/net/ipv6/sit.c
25+++ b/net/ipv6/sit.c
26@@ -1069,7 +1069,7 @@ static void ipip6_tunnel_bind_dev(struct
27 if (!tdev && tunnel->parms.link)
28 tdev = __dev_get_by_index(tunnel->net, tunnel->parms.link);
29
30- if (tdev) {
31+ if (tdev && !netif_is_l3_master(tdev)) {
32 int t_hlen = tunnel->hlen + sizeof(struct iphdr);
33
34 dev->hard_header_len = tdev->hard_header_len + sizeof(struct iphdr);