Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-10-15 17:51:37 +0200
committerTakashi Iwai <tiwai@suse.de>2018-10-15 17:51:53 +0200
commitea6c054c174d3e58af2d43dcd737fa556941bb9b (patch)
tree379cc94345734c6420bcff0559d4242513539205
parent5e200467c792a36c3314536bd10df2f1de0e10c7 (diff)
vti6: fix PMTU caching and reporting on xmit (bsc#1051510).
-rw-r--r--patches.fixes/vti6-fix-PMTU-caching-and-reporting-on-xmit.patch54
-rw-r--r--series.conf1
2 files changed, 55 insertions, 0 deletions
diff --git a/patches.fixes/vti6-fix-PMTU-caching-and-reporting-on-xmit.patch b/patches.fixes/vti6-fix-PMTU-caching-and-reporting-on-xmit.patch
new file mode 100644
index 0000000000..8b2d232536
--- /dev/null
+++ b/patches.fixes/vti6-fix-PMTU-caching-and-reporting-on-xmit.patch
@@ -0,0 +1,54 @@
+From d6990976af7c5d8f55903bfb4289b6fb030bf754 Mon Sep 17 00:00:00 2001
+From: Eyal Birger <eyal.birger@gmail.com>
+Date: Thu, 7 Jun 2018 10:11:02 +0300
+Subject: [PATCH] vti6: fix PMTU caching and reporting on xmit
+Git-commit: d6990976af7c5d8f55903bfb4289b6fb030bf754
+Patch-mainline: v4.18-rc8
+References: bsc#1051510
+
+When setting the skb->dst before doing the MTU check, the route PMTU
+caching and reporting is done on the new dst which is about to be
+released.
+
+Instead, PMTU handling should be done using the original dst.
+
+This is aligned with IPv4 VTI.
+
+Fixes: ccd740cbc6 ("vti6: Add pmtu handling to vti6_xmit.")
+Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ net/ipv6/ip6_vti.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+--- a/net/ipv6/ip6_vti.c
++++ b/net/ipv6/ip6_vti.c
+@@ -480,10 +480,6 @@ vti6_xmit(struct sk_buff *skb, struct ne
+ goto tx_err_dst_release;
+ }
+
+- skb_scrub_packet(skb, !net_eq(t->net, dev_net(dev)));
+- skb_dst_set(skb, dst);
+- skb->dev = skb_dst(skb)->dev;
+-
+ mtu = dst_mtu(dst);
+ if (!skb->ignore_df && skb->len > mtu) {
+ skb_dst(skb)->ops->update_pmtu(dst, NULL, skb, mtu);
+@@ -498,9 +494,14 @@ vti6_xmit(struct sk_buff *skb, struct ne
+ htonl(mtu));
+ }
+
+- return -EMSGSIZE;
++ err = -EMSGSIZE;
++ goto tx_err_dst_release;
+ }
+
++ skb_scrub_packet(skb, !net_eq(t->net, dev_net(dev)));
++ skb_dst_set(skb, dst);
++ skb->dev = skb_dst(skb)->dev;
++
+ err = dst_output(t->net, skb->sk, skb);
+ if (net_xmit_eval(err) == 0) {
+ struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats);
diff --git a/series.conf b/series.conf
index d3ac4ee2d3..4989b3a16b 100644
--- a/series.conf
+++ b/series.conf
@@ -16984,6 +16984,7 @@
patches.fixes/squashfs-more-metadata-hardening.patch
patches.suse/net-fix-amd-xgbe-flow-control-issue.patch
patches.suse/net-ena-Fix-use-of-uninitialized-DMA-address-bits-fi.patch
+ patches.fixes/vti6-fix-PMTU-caching-and-reporting-on-xmit.patch
patches.fixes/0001-net-lan78xx-fix-rx-handling-before-first-packet-is-s.patch
patches.suse/ipv4-remove-BUG_ON-from-fib_compute_spec_dst.patch
patches.suse/net-mdio-mux-bcm-iproc-fix-wrong-getter-and-setter-p.patch