]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/netfilter/nf_nat_proto_icmp.c
[SCTP]: extend exported data in /proc/net/sctp/assoc
[linux-2.6-omap-h63xx.git] / net / ipv4 / netfilter / nf_nat_proto_icmp.c
index 898d737711552e64b7f39a2022f3b845d5953d79..03a02969aa5710fde9a897a2d913396b17b94bee 100644 (file)
@@ -52,26 +52,26 @@ icmp_unique_tuple(struct nf_conntrack_tuple *tuple,
 }
 
 static int
-icmp_manip_pkt(struct sk_buff **pskb,
+icmp_manip_pkt(struct sk_buff *skb,
               unsigned int iphdroff,
               const struct nf_conntrack_tuple *tuple,
               enum nf_nat_manip_type maniptype)
 {
-       struct iphdr *iph = (struct iphdr *)((*pskb)->data + iphdroff);
+       const struct iphdr *iph = (struct iphdr *)(skb->data + iphdroff);
        struct icmphdr *hdr;
        unsigned int hdroff = iphdroff + iph->ihl*4;
 
-       if (!skb_make_writable(pskb, hdroff + sizeof(*hdr)))
+       if (!skb_make_writable(skb, hdroff + sizeof(*hdr)))
                return 0;
 
-       hdr = (struct icmphdr *)((*pskb)->data + hdroff);
-       nf_proto_csum_replace2(&hdr->checksum, *pskb,
-                              hdr->un.echo.id, tuple->src.u.icmp.id, 0);
+       hdr = (struct icmphdr *)(skb->data + hdroff);
+       inet_proto_csum_replace2(&hdr->checksum, skb,
+                                hdr->un.echo.id, tuple->src.u.icmp.id, 0);
        hdr->un.echo.id = tuple->src.u.icmp.id;
        return 1;
 }
 
-struct nf_nat_protocol nf_nat_protocol_icmp = {
+const struct nf_nat_protocol nf_nat_protocol_icmp = {
        .name                   = "ICMP",
        .protonum               = IPPROTO_ICMP,
        .me                     = THIS_MODULE,