summaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/nf_nat_proto_dccp.c
diff options
context:
space:
mode:
authorJan Engelhardt2008-04-14 11:15:53 +0200
committerPatrick McHardy2008-04-14 11:15:53 +0200
commitf2ea825f483d5d78754ae813b6db63f8b74e9343 (patch)
tree9a71a03a99443078a14aad195fb6c15cbb3920c8 /net/ipv4/netfilter/nf_nat_proto_dccp.c
parent[NETFILTER]: nf_conntrack: use bool type in struct nf_conntrack_tuple.h (diff)
downloadkernel-qcow2-linux-f2ea825f483d5d78754ae813b6db63f8b74e9343.tar.gz
kernel-qcow2-linux-f2ea825f483d5d78754ae813b6db63f8b74e9343.tar.xz
kernel-qcow2-linux-f2ea825f483d5d78754ae813b6db63f8b74e9343.zip
[NETFILTER]: nf_nat: use bool type in nf_nat_proto
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv4/netfilter/nf_nat_proto_dccp.c')
-rw-r--r--net/ipv4/netfilter/nf_nat_proto_dccp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/netfilter/nf_nat_proto_dccp.c b/net/ipv4/netfilter/nf_nat_proto_dccp.c
index 12b51b38442e..f78eb26e9a20 100644
--- a/net/ipv4/netfilter/nf_nat_proto_dccp.c
+++ b/net/ipv4/netfilter/nf_nat_proto_dccp.c
@@ -22,7 +22,7 @@
static u_int16_t dccp_port_rover;
-static int
+static bool
dccp_unique_tuple(struct nf_conntrack_tuple *tuple,
const struct nf_nat_range *range,
enum nf_nat_manip_type maniptype,
@@ -32,7 +32,7 @@ dccp_unique_tuple(struct nf_conntrack_tuple *tuple,
&dccp_port_rover);
}
-static int
+static bool
dccp_manip_pkt(struct sk_buff *skb,
unsigned int iphdroff,
const struct nf_conntrack_tuple *tuple,
@@ -49,7 +49,7 @@ dccp_manip_pkt(struct sk_buff *skb,
hdrsize = sizeof(struct dccp_hdr);
if (!skb_make_writable(skb, hdroff + hdrsize))
- return 0;
+ return false;
iph = (struct iphdr *)(skb->data + iphdroff);
hdr = (struct dccp_hdr *)(skb->data + hdroff);
@@ -70,12 +70,12 @@ dccp_manip_pkt(struct sk_buff *skb,
*portptr = newport;
if (hdrsize < sizeof(*hdr))
- return 1;
+ return true;
inet_proto_csum_replace4(&hdr->dccph_checksum, skb, oldip, newip, 1);
inet_proto_csum_replace2(&hdr->dccph_checksum, skb, oldport, newport,
0);
- return 1;
+ return true;
}
static const struct nf_nat_protocol nf_nat_protocol_dccp = {