diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-07-19 02:07:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-19 02:07:09 -0400 |
commit | 336d3262df71fcd2661180bb35d5ea41b4cbca58 (patch) | |
tree | 54078334c9c3706a003d4b54a8e9e9b23aa01cef /net/ipv4 | |
parent | 4e54064e0a13b7a7d4a481123c1783f770538e30 (diff) |
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>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/nf_nat_proto_sctp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/nf_nat_proto_sctp.c b/net/ipv4/netfilter/nf_nat_proto_sctp.c index 82e4c0e286b..65e470bc612 100644 --- a/net/ipv4/netfilter/nf_nat_proto_sctp.c +++ b/net/ipv4/netfilter/nf_nat_proto_sctp.c | |||
@@ -36,7 +36,7 @@ sctp_manip_pkt(struct sk_buff *skb, | |||
36 | sctp_sctphdr_t *hdr; | 36 | sctp_sctphdr_t *hdr; |
37 | unsigned int hdroff = iphdroff + iph->ihl*4; | 37 | unsigned int hdroff = iphdroff + iph->ihl*4; |
38 | __be32 oldip, newip; | 38 | __be32 oldip, newip; |
39 | u32 crc32; | 39 | __be32 crc32; |
40 | 40 | ||
41 | if (!skb_make_writable(skb, hdroff + sizeof(*hdr))) | 41 | if (!skb_make_writable(skb, hdroff + sizeof(*hdr))) |
42 | return false; | 42 | return false; |
@@ -61,7 +61,7 @@ sctp_manip_pkt(struct sk_buff *skb, | |||
61 | crc32 = sctp_update_cksum((u8 *)skb->data, skb_headlen(skb), | 61 | crc32 = sctp_update_cksum((u8 *)skb->data, skb_headlen(skb), |
62 | crc32); | 62 | crc32); |
63 | crc32 = sctp_end_cksum(crc32); | 63 | crc32 = sctp_end_cksum(crc32); |
64 | hdr->checksum = htonl(crc32); | 64 | hdr->checksum = crc32; |
65 | 65 | ||
66 | return true; | 66 | return true; |
67 | } | 67 | } |