]> err.no Git - linux-2.6/blobdiff - net/ipv4/netfilter/nf_nat_proto_udp.c
Merge branch 'linus' into cpus4096-for-linus
[linux-2.6] / net / ipv4 / netfilter / nf_nat_proto_udp.c
index a182f5ac317740d3c2e236e25b1456c9c9fad2e3..9e61c79492e4beb0d02a56c0f1bb4b42226630b7 100644 (file)
@@ -19,7 +19,7 @@
 
 static u_int16_t udp_port_rover;
 
-static int
+static bool
 udp_unique_tuple(struct nf_conntrack_tuple *tuple,
                 const struct nf_nat_range *range,
                 enum nf_nat_manip_type maniptype,
@@ -29,7 +29,7 @@ udp_unique_tuple(struct nf_conntrack_tuple *tuple,
                                         &udp_port_rover);
 }
 
-static int
+static bool
 udp_manip_pkt(struct sk_buff *skb,
              unsigned int iphdroff,
              const struct nf_conntrack_tuple *tuple,
@@ -42,7 +42,7 @@ udp_manip_pkt(struct sk_buff *skb,
        __be16 *portptr, newport;
 
        if (!skb_make_writable(skb, hdroff + sizeof(*hdr)))
-               return 0;
+               return false;
 
        iph = (struct iphdr *)(skb->data + iphdroff);
        hdr = (struct udphdr *)(skb->data + hdroff);
@@ -68,18 +68,17 @@ udp_manip_pkt(struct sk_buff *skb,
                        hdr->check = CSUM_MANGLED_0;
        }
        *portptr = newport;
-       return 1;
+       return true;
 }
 
 const struct nf_nat_protocol nf_nat_protocol_udp = {
-       .name                   = "UDP",
        .protonum               = IPPROTO_UDP,
        .me                     = THIS_MODULE,
        .manip_pkt              = udp_manip_pkt,
        .in_range               = nf_nat_proto_in_range,
        .unique_tuple           = udp_unique_tuple,
 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
-       .range_to_nlattr        = nf_nat_port_range_to_nlattr,
-       .nlattr_to_range        = nf_nat_port_nlattr_to_range,
+       .range_to_nlattr        = nf_nat_proto_range_to_nlattr,
+       .nlattr_to_range        = nf_nat_proto_nlattr_to_range,
 #endif
 };