diff options
Diffstat (limited to 'net/sctp/input.c')
| -rw-r--r-- | net/sctp/input.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c index 3fa4d858c35a..98b69bbecdd9 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
| @@ -29,10 +29,7 @@ | |||
| 29 | * | 29 | * |
| 30 | * Please send any bug reports or fixes you make to the | 30 | * Please send any bug reports or fixes you make to the |
| 31 | * email address(es): | 31 | * email address(es): |
| 32 | * lksctp developers <lksctp-developers@lists.sourceforge.net> | 32 | * lksctp developers <linux-sctp@vger.kernel.org> |
| 33 | * | ||
| 34 | * Or submit a bug report through the following website: | ||
| 35 | * http://www.sf.net/projects/lksctp | ||
| 36 | * | 33 | * |
| 37 | * Written or modified by: | 34 | * Written or modified by: |
| 38 | * La Monte H.P. Yarroll <piggy@acm.org> | 35 | * La Monte H.P. Yarroll <piggy@acm.org> |
| @@ -43,9 +40,6 @@ | |||
| 43 | * Daisy Chang <daisyc@us.ibm.com> | 40 | * Daisy Chang <daisyc@us.ibm.com> |
| 44 | * Sridhar Samudrala <sri@us.ibm.com> | 41 | * Sridhar Samudrala <sri@us.ibm.com> |
| 45 | * Ardelle Fan <ardelle.fan@intel.com> | 42 | * Ardelle Fan <ardelle.fan@intel.com> |
| 46 | * | ||
| 47 | * Any bugs reported given to us we will try to fix... any fixes shared will | ||
| 48 | * be incorporated into the next SCTP release. | ||
| 49 | */ | 43 | */ |
| 50 | 44 | ||
| 51 | #include <linux/types.h> | 45 | #include <linux/types.h> |
| @@ -87,15 +81,7 @@ static inline int sctp_rcv_checksum(struct net *net, struct sk_buff *skb) | |||
| 87 | { | 81 | { |
| 88 | struct sctphdr *sh = sctp_hdr(skb); | 82 | struct sctphdr *sh = sctp_hdr(skb); |
| 89 | __le32 cmp = sh->checksum; | 83 | __le32 cmp = sh->checksum; |
| 90 | struct sk_buff *list; | 84 | __le32 val = sctp_compute_cksum(skb, 0); |
| 91 | __le32 val; | ||
| 92 | __u32 tmp = sctp_start_cksum((__u8 *)sh, skb_headlen(skb)); | ||
| 93 | |||
| 94 | skb_walk_frags(skb, list) | ||
| 95 | tmp = sctp_update_cksum((__u8 *)list->data, skb_headlen(list), | ||
| 96 | tmp); | ||
| 97 | |||
| 98 | val = sctp_end_cksum(tmp); | ||
| 99 | 85 | ||
| 100 | if (val != cmp) { | 86 | if (val != cmp) { |
| 101 | /* CRC failure, dump it. */ | 87 | /* CRC failure, dump it. */ |
| @@ -648,8 +634,7 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info) | |||
| 648 | break; | 634 | break; |
| 649 | case ICMP_REDIRECT: | 635 | case ICMP_REDIRECT: |
| 650 | sctp_icmp_redirect(sk, transport, skb); | 636 | sctp_icmp_redirect(sk, transport, skb); |
| 651 | err = 0; | 637 | /* Fall through to out_unlock. */ |
| 652 | break; | ||
| 653 | default: | 638 | default: |
| 654 | goto out_unlock; | 639 | goto out_unlock; |
| 655 | } | 640 | } |
