diff options
author | Daniel Axtens | 2018-03-09 04:06:09 +0100 |
---|---|---|
committer | David S. Miller | 2018-03-09 17:41:47 +0100 |
commit | 1dd27cde30e85774c77349c804229431616d594a (patch) | |
tree | dac4ba324dcb8010bacef9054046748ddb0df4db /net/core/skbuff.c | |
parent | ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event() (diff) | |
download | kernel-qcow2-linux-1dd27cde30e85774c77349c804229431616d594a.tar.gz kernel-qcow2-linux-1dd27cde30e85774c77349c804229431616d594a.tar.xz kernel-qcow2-linux-1dd27cde30e85774c77349c804229431616d594a.zip |
net: use skb_is_gso_sctp() instead of open-coding
As well as the basic conversion, I noticed that a lot of the
SCTP code checks gso_type without first checking skb_is_gso()
so I have added that where appropriate.
Also, document the helper.
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r-- | net/core/skbuff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 0bb0d8877954..baf990528943 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4904,7 +4904,7 @@ static unsigned int skb_gso_transport_seglen(const struct sk_buff *skb) thlen += inner_tcp_hdrlen(skb); } else if (likely(shinfo->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))) { thlen = tcp_hdrlen(skb); - } else if (unlikely(shinfo->gso_type & SKB_GSO_SCTP)) { + } else if (unlikely(skb_is_gso_sctp(skb))) { thlen = sizeof(struct sctphdr); } /* UFO sets gso_size to the size of the fragmentation |