summaryrefslogtreecommitdiffstats
path: root/net/sched/act_csum.c
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2018-03-09 04:06:09 +0100
committerDavid S. Miller <davem@davemloft.net>2018-03-09 17:41:47 +0100
commit1dd27cde30e85774c77349c804229431616d594a (patch)
treedac4ba324dcb8010bacef9054046748ddb0df4db /net/sched/act_csum.c
parentieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event() (diff)
downloadlinux-1dd27cde30e85774c77349c804229431616d594a.tar.xz
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/sched/act_csum.c')
-rw-r--r--net/sched/act_csum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index b7ba9b06b147..24b2e8e681cf 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@ -350,7 +350,7 @@ static int tcf_csum_sctp(struct sk_buff *skb, unsigned int ihl,
{
struct sctphdr *sctph;
- if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_SCTP)
+ if (skb_is_gso(skb) && skb_is_gso_sctp(skb))
return 1;
sctph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*sctph));