]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Nov 2018 07:21:51 +0000 (08:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Nov 2018 07:21:51 +0000 (08:21 +0100)
added patches:
ip_tunnel-don-t-force-df-when-mtu-is-locked.patch
net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch

queue-3.18/ip_tunnel-don-t-force-df-when-mtu-is-locked.patch [new file with mode: 0644]
queue-3.18/net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch [new file with mode: 0644]
queue-3.18/series [new file with mode: 0644]

diff --git a/queue-3.18/ip_tunnel-don-t-force-df-when-mtu-is-locked.patch b/queue-3.18/ip_tunnel-don-t-force-df-when-mtu-is-locked.patch
new file mode 100644 (file)
index 0000000..f114709
--- /dev/null
@@ -0,0 +1,39 @@
+From foo@baz Thu Nov 22 08:21:34 CET 2018
+From: Sabrina Dubroca <sd@queasysnail.net>
+Date: Fri, 16 Nov 2018 16:58:19 +0100
+Subject: ip_tunnel: don't force DF when MTU is locked
+
+From: Sabrina Dubroca <sd@queasysnail.net>
+
+[ Upstream commit 16f7eb2b77b55da816c4e207f3f9440a8cafc00a ]
+
+The various types of tunnels running over IPv4 can ask to set the DF
+bit to do PMTU discovery. However, PMTU discovery is subject to the
+threshold set by the net.ipv4.route.min_pmtu sysctl, and is also
+disabled on routes with "mtu lock". In those cases, we shouldn't set
+the DF bit.
+
+This patch makes setting the DF bit conditional on the route's MTU
+locking state.
+
+This issue seems to be older than git history.
+
+Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
+Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv4/ip_tunnel_core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/ipv4/ip_tunnel_core.c
++++ b/net/ipv4/ip_tunnel_core.c
+@@ -68,7 +68,7 @@ int iptunnel_xmit(struct sock *sk, struc
+       iph->version    =       4;
+       iph->ihl        =       sizeof(struct iphdr) >> 2;
+-      iph->frag_off   =       df;
++      iph->frag_off   =       ip_mtu_locked(&rt->dst) ? 0 : df;
+       iph->protocol   =       proto;
+       iph->tos        =       tos;
+       iph->daddr      =       dst;
diff --git a/queue-3.18/net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch b/queue-3.18/net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch
new file mode 100644 (file)
index 0000000..f12960d
--- /dev/null
@@ -0,0 +1,47 @@
+From foo@baz Thu Nov 22 08:21:34 CET 2018
+From: Eric Dumazet <edumazet@google.com>
+Date: Sat, 17 Nov 2018 21:57:02 -0800
+Subject: net-gro: reset skb->pkt_type in napi_reuse_skb()
+
+From: Eric Dumazet <edumazet@google.com>
+
+[ Upstream commit 33d9a2c72f086cbf1087b2fd2d1a15aa9df14a7f ]
+
+eth_type_trans() assumes initial value for skb->pkt_type
+is PACKET_HOST.
+
+This is indeed the value right after a fresh skb allocation.
+
+However, it is possible that GRO merged a packet with a different
+value (like PACKET_OTHERHOST in case macvlan is used), so
+we need to make sure napi->skb will have pkt_type set back to
+PACKET_HOST.
+
+Otherwise, valid packets might be dropped by the stack because
+their pkt_type is not PACKET_HOST.
+
+napi_reuse_skb() was added in commit 96e93eab2033 ("gro: Add
+internal interfaces for VLAN"), but this bug always has
+been there.
+
+Fixes: 96e93eab2033 ("gro: Add internal interfaces for VLAN")
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/core/dev.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -4201,6 +4201,10 @@ static void napi_reuse_skb(struct napi_s
+       skb->vlan_tci = 0;
+       skb->dev = napi->dev;
+       skb->skb_iif = 0;
++
++      /* eth_type_trans() assumes pkt_type is PACKET_HOST */
++      skb->pkt_type = PACKET_HOST;
++
+       skb->encapsulation = 0;
+       skb_shinfo(skb)->gso_type = 0;
+       skb->truesize = SKB_TRUESIZE(skb_end_offset(skb));
diff --git a/queue-3.18/series b/queue-3.18/series
new file mode 100644 (file)
index 0000000..51f4aa5
--- /dev/null
@@ -0,0 +1,2 @@
+ip_tunnel-don-t-force-df-when-mtu-is-locked.patch
+net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch