sctp: remove unnecessary byteshifting, calculate directly in big-endian

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Harvey Harrison 2008-07-18 23:07:09 -07:00 committed by David S. Miller
parent 4e54064e0a
commit 336d3262df
4 changed files with 20 additions and 15 deletions

View file

@ -83,8 +83,8 @@ static inline int sctp_rcv_checksum(struct sk_buff *skb)
{
struct sk_buff *list = skb_shinfo(skb)->frag_list;
struct sctphdr *sh = sctp_hdr(skb);
__u32 cmp = ntohl(sh->checksum);
__u32 val = sctp_start_cksum((__u8 *)sh, skb_headlen(skb));
__be32 cmp = sh->checksum;
__be32 val = sctp_start_cksum((__u8 *)sh, skb_headlen(skb));
for (; list; list = list->next)
val = sctp_update_cksum((__u8 *)list->data, skb_headlen(list),