]> err.no Git - linux-2.6/blobdiff - net/ipv4/netfilter/nf_nat_proto_sctp.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[linux-2.6] / net / ipv4 / netfilter / nf_nat_proto_sctp.c
index 3d3faa9d5f6d87ee9d40b466ca2f5755090d7e98..65e470bc6123dfcabf0956b8542ffa043f36980c 100644 (file)
@@ -16,7 +16,7 @@
 
 static u_int16_t nf_sctp_port_rover;
 
-static int
+static bool
 sctp_unique_tuple(struct nf_conntrack_tuple *tuple,
                  const struct nf_nat_range *range,
                  enum nf_nat_manip_type maniptype,
@@ -26,7 +26,7 @@ sctp_unique_tuple(struct nf_conntrack_tuple *tuple,
                                         &nf_sctp_port_rover);
 }
 
-static int
+static bool
 sctp_manip_pkt(struct sk_buff *skb,
               unsigned int iphdroff,
               const struct nf_conntrack_tuple *tuple,
@@ -36,10 +36,10 @@ 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 0;
+               return false;
 
        iph = (struct iphdr *)(skb->data + iphdroff);
        hdr = (struct sctphdr *)(skb->data + hdroff);
@@ -61,9 +61,9 @@ 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 1;
+       return true;
 }
 
 static const struct nf_nat_protocol nf_nat_protocol_sctp = {