From: Greg Kroah-Hartman Date: Thu, 22 Nov 2018 07:21:51 +0000 (+0100) Subject: 3.18-stable patches X-Git-Tag: v4.19.4~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=317c4246e208f63257f95ea5f2dc9c3a69c05037;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: ip_tunnel-don-t-force-df-when-mtu-is-locked.patch net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch --- 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 index 00000000000..f1147090f47 --- /dev/null +++ b/queue-3.18/ip_tunnel-don-t-force-df-when-mtu-is-locked.patch @@ -0,0 +1,39 @@ +From foo@baz Thu Nov 22 08:21:34 CET 2018 +From: Sabrina Dubroca +Date: Fri, 16 Nov 2018 16:58:19 +0100 +Subject: ip_tunnel: don't force DF when MTU is locked + +From: Sabrina Dubroca + +[ 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 +Reviewed-by: Stefano Brivio +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..f12960d6191 --- /dev/null +++ b/queue-3.18/net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch @@ -0,0 +1,47 @@ +From foo@baz Thu Nov 22 08:21:34 CET 2018 +From: Eric Dumazet +Date: Sat, 17 Nov 2018 21:57:02 -0800 +Subject: net-gro: reset skb->pkt_type in napi_reuse_skb() + +From: Eric Dumazet + +[ 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 +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..51f4aa52ec2 --- /dev/null +++ b/queue-3.18/series @@ -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