diff options
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r-- | net/sctp/input.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c index 0247cc432e02..b381d78548ac 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
@@ -106,6 +106,7 @@ int sctp_rcv(struct sk_buff *skb) | |||
106 | int family; | 106 | int family; |
107 | struct sctp_af *af; | 107 | struct sctp_af *af; |
108 | struct net *net = dev_net(skb->dev); | 108 | struct net *net = dev_net(skb->dev); |
109 | bool is_gso = skb_is_gso(skb) && skb_is_gso_sctp(skb); | ||
109 | 110 | ||
110 | if (skb->pkt_type != PACKET_HOST) | 111 | if (skb->pkt_type != PACKET_HOST) |
111 | goto discard_it; | 112 | goto discard_it; |
@@ -123,8 +124,7 @@ int sctp_rcv(struct sk_buff *skb) | |||
123 | * it's better to just linearize it otherwise crc computing | 124 | * it's better to just linearize it otherwise crc computing |
124 | * takes longer. | 125 | * takes longer. |
125 | */ | 126 | */ |
126 | if ((!(skb_shinfo(skb)->gso_type & SKB_GSO_SCTP) && | 127 | if ((!is_gso && skb_linearize(skb)) || |
127 | skb_linearize(skb)) || | ||
128 | !pskb_may_pull(skb, sizeof(struct sctphdr))) | 128 | !pskb_may_pull(skb, sizeof(struct sctphdr))) |
129 | goto discard_it; | 129 | goto discard_it; |
130 | 130 | ||
@@ -135,7 +135,7 @@ int sctp_rcv(struct sk_buff *skb) | |||
135 | if (skb_csum_unnecessary(skb)) | 135 | if (skb_csum_unnecessary(skb)) |
136 | __skb_decr_checksum_unnecessary(skb); | 136 | __skb_decr_checksum_unnecessary(skb); |
137 | else if (!sctp_checksum_disable && | 137 | else if (!sctp_checksum_disable && |
138 | !(skb_shinfo(skb)->gso_type & SKB_GSO_SCTP) && | 138 | !is_gso && |
139 | sctp_rcv_checksum(net, skb) < 0) | 139 | sctp_rcv_checksum(net, skb) < 0) |
140 | goto discard_it; | 140 | goto discard_it; |
141 | skb->csum_valid = 1; | 141 | skb->csum_valid = 1; |
@@ -1218,7 +1218,7 @@ static struct sctp_association *__sctp_rcv_lookup_harder(struct net *net, | |||
1218 | * issue as packets hitting this are mostly INIT or INIT-ACK and | 1218 | * issue as packets hitting this are mostly INIT or INIT-ACK and |
1219 | * those cannot be on GSO-style anyway. | 1219 | * those cannot be on GSO-style anyway. |
1220 | */ | 1220 | */ |
1221 | if ((skb_shinfo(skb)->gso_type & SKB_GSO_SCTP) == SKB_GSO_SCTP) | 1221 | if (skb_is_gso(skb) && skb_is_gso_sctp(skb)) |
1222 | return NULL; | 1222 | return NULL; |
1223 | 1223 | ||
1224 | ch = (struct sctp_chunkhdr *)skb->data; | 1224 | ch = (struct sctp_chunkhdr *)skb->data; |