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>
This commit is contained in:
committed by
David S. Miller
parent
ca0edb131b
commit
1dd27cde30
@ -45,7 +45,7 @@ static struct sk_buff *sctp_gso_segment(struct sk_buff *skb,
|
||||
struct sk_buff *segs = ERR_PTR(-EINVAL);
|
||||
struct sctphdr *sh;
|
||||
|
||||
if (!(skb_shinfo(skb)->gso_type & SKB_GSO_SCTP))
|
||||
if (!skb_is_gso_sctp(skb))
|
||||
goto out;
|
||||
|
||||
sh = sctp_hdr(skb);
|
||||
|
Reference in New Issue
Block a user