diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-07-19 08:07:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-19 08:07:09 +0200 |
commit | 336d3262df71fcd2661180bb35d5ea41b4cbca58 (patch) | |
tree | 54078334c9c3706a003d4b54a8e9e9b23aa01cef /net/ipv4 | |
parent | sctp: Allow only 1 listening socket with SO_REUSEADDR (diff) | |
download | linux-336d3262df71fcd2661180bb35d5ea41b4cbca58.tar.xz linux-336d3262df71fcd2661180bb35d5ea41b4cbca58.zip |
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 82e4c0e286b8..65e470bc6123 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, sctp_sctphdr_t *hdr; unsigned int hdroff = iphdroff + iph->ihl*4; __be32 oldip, newip; - u32 crc32; + __be32 crc32; if (!skb_make_writable(skb, hdroff + sizeof(*hdr))) return false; @@ -61,7 +61,7 @@ sctp_manip_pkt(struct sk_buff *skb, crc32 = sctp_update_cksum((u8 *)skb->data, skb_headlen(skb), crc32); crc32 = sctp_end_cksum(crc32); - hdr->checksum = htonl(crc32); + hdr->checksum = crc32; return true; } |