Re: [PATCHv2 net] sctp: get sctphdr by offset in sctp_compute_cksum

2019-03-19 Thread Neil Horman
On Mon, Mar 18, 2019 at 07:47:00PM +0800, Xin Long wrote: > 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.

Re: [PATCHv2 net] sctp: get sctphdr by offset in sctp_compute_cksum

2019-03-18 Thread David Miller
From: Xin Long Date: Mon, 18 Mar 2019 19:47:00 +0800 > 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. >

[PATCHv2 net] sctp: get sctphdr by offset in sctp_compute_cksum

2019-03-18 Thread Xin Long
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