Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-05-10 14:13:58 +0200
committerJiri Slaby <jslaby@suse.cz>2019-05-16 08:28:00 +0200
commit7b0744f55906b5b52d3541b47ceaa2f2b596b995 (patch)
tree4f2a7a20d29969f1c4cafb8c504acc0ea42cf72e
parent3ea1ea9c6bae7c2ae57200a7f942d0d55031e233 (diff)
sctp: get sctphdr by offset in sctp_compute_cksum
(networking-stable-19_03_28).
-rw-r--r--patches.suse/sctp-get-sctphdr-by-offset-in-sctp_compute_cksum.patch38
-rw-r--r--series.conf1
2 files changed, 39 insertions, 0 deletions
diff --git a/patches.suse/sctp-get-sctphdr-by-offset-in-sctp_compute_cksum.patch b/patches.suse/sctp-get-sctphdr-by-offset-in-sctp_compute_cksum.patch
new file mode 100644
index 0000000000..3e8c3e1b9b
--- /dev/null
+++ b/patches.suse/sctp-get-sctphdr-by-offset-in-sctp_compute_cksum.patch
@@ -0,0 +1,38 @@
+From: Xin Long <lucien.xin@gmail.com>
+Date: Mon, 18 Mar 2019 19:47:00 +0800
+Subject: sctp: get sctphdr by offset in sctp_compute_cksum
+Git-commit: 273160ffc6b993c7c91627f5a84799c66dfe4dee
+Patch-mainline: v5.1-rc3
+References: networking-stable-19_03_28
+
+sctp_hdr(skb) only works when skb->transport_header is set properly.
+
+But in Netfilter, skb->transport_header for ipv6 is not guaranteed
+to be right value for sctphdr. It would cause to fail to check the
+checksum for sctp packets.
+
+So fix it by using offset, which is always right in all places.
+
+v1->v2:
+ - Fix the changelog.
+
+Fixes: e6d8b64b34aa ("net: sctp: fix and consolidate SCTP checksumming code")
+Reported-by: Li Shuang <shuali@redhat.com>
+Signed-off-by: Xin Long <lucien.xin@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ include/net/sctp/checksum.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/net/sctp/checksum.h
++++ b/include/net/sctp/checksum.h
+@@ -60,7 +60,7 @@ static inline __wsum sctp_csum_combine(_
+ static inline __le32 sctp_compute_cksum(const struct sk_buff *skb,
+ unsigned int offset)
+ {
+- struct sctphdr *sh = sctp_hdr(skb);
++ struct sctphdr *sh = (struct sctphdr *)(skb->data + offset);
+ __le32 ret, old = sh->checksum;
+ const struct skb_checksum_ops ops = {
+ .update = sctp_csum_update,
diff --git a/series.conf b/series.conf
index a67b6301b2..e88901ed9e 100644
--- a/series.conf
+++ b/series.conf
@@ -21584,6 +21584,7 @@
patches.suse/net-aquantia-fix-rx-checksum-offload-for-UDP-TCP-ove.patch
patches.suse/vxlan-Don-t-call-gro_cells_destroy-before-device-is-.patch
patches.suse/packets-Always-register-packet-sk-in-the-same-order.patch
+ patches.suse/sctp-get-sctphdr-by-offset-in-sctp_compute_cksum.patch
patches.drivers/mISDN-hfcpci-Test-both-vendor-device-ID-for-Digium-H.patch
patches.suse/net-packet-Set-__GFP_NOWARN-upon-allocation-in-alloc.patch
patches.fixes/0001-netfilter-bridge-set-skb-transport_header-before-ent.patch