Commit ce0369a4 authored by Sridhar Samudrala's avatar Sridhar Samudrala

[SCTP] Fix the duplicate increment of checksum error counter and

       counting bad packet errors as checksum errors.
parent 5bad7e07
......@@ -124,16 +124,16 @@ int sctp_rcv(struct sk_buff *skb)
/* Pull up the IP and SCTP headers. */
__skb_pull(skb, skb->h.raw - skb->data);
if (skb->len < sizeof(struct sctphdr))
goto bad_packet;
goto discard_it;
if (sctp_rcv_checksum(skb) < 0)
goto bad_packet;
goto discard_it;
skb_pull(skb, sizeof(struct sctphdr));
family = ipver2af(skb->nh.iph->version);
af = sctp_get_af_specific(family);
if (unlikely(!af))
goto bad_packet;
goto discard_it;
/* Initialize local addresses for lookups. */
af->from_skb(&src, skb, 1);
......@@ -223,9 +223,6 @@ int sctp_rcv(struct sk_buff *skb)
sock_put(sk);
return ret;
bad_packet:
SCTP_INC_STATS(SctpChecksumErrors);
discard_it:
kfree_skb(skb);
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment