X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsctp%2Finput.c;fp=net%2Fsctp%2Finput.c;h=2060bbeb30148135735e9587feb40a4cd00c9d18;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=70d6606e2812e3eaaa9e39206b9c967c5e5e3d7e;hpb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;p=linux-2.6.git diff --git a/net/sctp/input.c b/net/sctp/input.c index 70d6606e2..2060bbeb3 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c @@ -135,13 +135,17 @@ int sctp_rcv(struct sk_buff *skb) SCTP_INC_STATS_BH(SCTP_MIB_INSCTPPACKS); + if (skb_linearize(skb)) + goto discard_it; + sh = (struct sctphdr *) skb->h.raw; /* Pull up the IP and SCTP headers. */ __skb_pull(skb, skb->h.raw - skb->data); if (skb->len < sizeof(struct sctphdr)) goto discard_it; - if (sctp_rcv_checksum(skb) < 0) + if ((skb->ip_summed != CHECKSUM_UNNECESSARY) && + (sctp_rcv_checksum(skb) < 0)) goto discard_it; skb_pull(skb, sizeof(struct sctphdr));