aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@gmx.de>2007-07-08 01:15:12 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-11 01:16:56 -0400
commitcff533ac12494fa002e2c46acc94d670e5f636a2 (patch)
treeab159436fa3f5c282455afafcf136fd03fa8225a /net/ipv4
parent7bfe24611671ec76b44281e582b38535e21f01a9 (diff)
[NETFILTER]: x_tables: switch hotdrop to bool
Switch the "hotdrop" variables to boolean Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/arp_tables.c2
-rw-r--r--net/ipv4/netfilter/ip_tables.c8
-rw-r--r--net/ipv4/netfilter/ipt_addrtype.c2
-rw-r--r--net/ipv4/netfilter/ipt_ah.c4
-rw-r--r--net/ipv4/netfilter/ipt_ecn.c6
-rw-r--r--net/ipv4/netfilter/ipt_iprange.c2
-rw-r--r--net/ipv4/netfilter/ipt_owner.c2
-rw-r--r--net/ipv4/netfilter/ipt_recent.c4
-rw-r--r--net/ipv4/netfilter/ipt_tos.c2
-rw-r--r--net/ipv4/netfilter/ipt_ttl.c2
10 files changed, 17 insertions, 17 deletions
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index cae41215e3c7..1d75a5cd7b44 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -224,7 +224,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
224 static const char nulldevname[IFNAMSIZ]; 224 static const char nulldevname[IFNAMSIZ];
225 unsigned int verdict = NF_DROP; 225 unsigned int verdict = NF_DROP;
226 struct arphdr *arp; 226 struct arphdr *arp;
227 int hotdrop = 0; 227 bool hotdrop = false;
228 struct arpt_entry *e, *back; 228 struct arpt_entry *e, *back;
229 const char *indev, *outdev; 229 const char *indev, *outdev;
230 void *table_base; 230 void *table_base;
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 9bacf1a03630..e2a893825656 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -188,7 +188,7 @@ int do_match(struct ipt_entry_match *m,
188 const struct net_device *in, 188 const struct net_device *in,
189 const struct net_device *out, 189 const struct net_device *out,
190 int offset, 190 int offset,
191 int *hotdrop) 191 bool *hotdrop)
192{ 192{
193 /* Stop iteration if it doesn't match */ 193 /* Stop iteration if it doesn't match */
194 if (!m->u.kernel.match->match(skb, in, out, m->u.kernel.match, m->data, 194 if (!m->u.kernel.match->match(skb, in, out, m->u.kernel.match, m->data,
@@ -216,7 +216,7 @@ ipt_do_table(struct sk_buff **pskb,
216 u_int16_t offset; 216 u_int16_t offset;
217 struct iphdr *ip; 217 struct iphdr *ip;
218 u_int16_t datalen; 218 u_int16_t datalen;
219 int hotdrop = 0; 219 bool hotdrop = false;
220 /* Initializing verdict to NF_DROP keeps gcc happy. */ 220 /* Initializing verdict to NF_DROP keeps gcc happy. */
221 unsigned int verdict = NF_DROP; 221 unsigned int verdict = NF_DROP;
222 const char *indev, *outdev; 222 const char *indev, *outdev;
@@ -2122,7 +2122,7 @@ icmp_match(const struct sk_buff *skb,
2122 const void *matchinfo, 2122 const void *matchinfo,
2123 int offset, 2123 int offset,
2124 unsigned int protoff, 2124 unsigned int protoff,
2125 int *hotdrop) 2125 bool *hotdrop)
2126{ 2126{
2127 struct icmphdr _icmph, *ic; 2127 struct icmphdr _icmph, *ic;
2128 const struct ipt_icmp *icmpinfo = matchinfo; 2128 const struct ipt_icmp *icmpinfo = matchinfo;
@@ -2137,7 +2137,7 @@ icmp_match(const struct sk_buff *skb,
2137 * can't. Hence, no choice but to drop. 2137 * can't. Hence, no choice but to drop.
2138 */ 2138 */
2139 duprintf("Dropping evil ICMP tinygram.\n"); 2139 duprintf("Dropping evil ICMP tinygram.\n");
2140 *hotdrop = 1; 2140 *hotdrop = true;
2141 return 0; 2141 return 0;
2142 } 2142 }
2143 2143
diff --git a/net/ipv4/netfilter/ipt_addrtype.c b/net/ipv4/netfilter/ipt_addrtype.c
index a652a1451552..a9a9b750ff2d 100644
--- a/net/ipv4/netfilter/ipt_addrtype.c
+++ b/net/ipv4/netfilter/ipt_addrtype.c
@@ -30,7 +30,7 @@ static inline int match_type(__be32 addr, u_int16_t mask)
30static int match(const struct sk_buff *skb, 30static int match(const struct sk_buff *skb,
31 const struct net_device *in, const struct net_device *out, 31 const struct net_device *in, const struct net_device *out,
32 const struct xt_match *match, const void *matchinfo, 32 const struct xt_match *match, const void *matchinfo,
33 int offset, unsigned int protoff, int *hotdrop) 33 int offset, unsigned int protoff, bool *hotdrop)
34{ 34{
35 const struct ipt_addrtype_info *info = matchinfo; 35 const struct ipt_addrtype_info *info = matchinfo;
36 const struct iphdr *iph = ip_hdr(skb); 36 const struct iphdr *iph = ip_hdr(skb);
diff --git a/net/ipv4/netfilter/ipt_ah.c b/net/ipv4/netfilter/ipt_ah.c
index 18a16782cf40..9a244e406a48 100644
--- a/net/ipv4/netfilter/ipt_ah.c
+++ b/net/ipv4/netfilter/ipt_ah.c
@@ -44,7 +44,7 @@ match(const struct sk_buff *skb,
44 const void *matchinfo, 44 const void *matchinfo,
45 int offset, 45 int offset,
46 unsigned int protoff, 46 unsigned int protoff,
47 int *hotdrop) 47 bool *hotdrop)
48{ 48{
49 struct ip_auth_hdr _ahdr, *ah; 49 struct ip_auth_hdr _ahdr, *ah;
50 const struct ipt_ah *ahinfo = matchinfo; 50 const struct ipt_ah *ahinfo = matchinfo;
@@ -60,7 +60,7 @@ match(const struct sk_buff *skb,
60 * can't. Hence, no choice but to drop. 60 * can't. Hence, no choice but to drop.
61 */ 61 */
62 duprintf("Dropping evil AH tinygram.\n"); 62 duprintf("Dropping evil AH tinygram.\n");
63 *hotdrop = 1; 63 *hotdrop = true;
64 return 0; 64 return 0;
65 } 65 }
66 66
diff --git a/net/ipv4/netfilter/ipt_ecn.c b/net/ipv4/netfilter/ipt_ecn.c
index 26218122f865..a47f3745553b 100644
--- a/net/ipv4/netfilter/ipt_ecn.c
+++ b/net/ipv4/netfilter/ipt_ecn.c
@@ -30,7 +30,7 @@ static inline int match_ip(const struct sk_buff *skb,
30 30
31static inline int match_tcp(const struct sk_buff *skb, 31static inline int match_tcp(const struct sk_buff *skb,
32 const struct ipt_ecn_info *einfo, 32 const struct ipt_ecn_info *einfo,
33 int *hotdrop) 33 bool *hotdrop)
34{ 34{
35 struct tcphdr _tcph, *th; 35 struct tcphdr _tcph, *th;
36 36
@@ -39,7 +39,7 @@ static inline int match_tcp(const struct sk_buff *skb,
39 */ 39 */
40 th = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_tcph), &_tcph); 40 th = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_tcph), &_tcph);
41 if (th == NULL) { 41 if (th == NULL) {
42 *hotdrop = 0; 42 *hotdrop = false;
43 return 0; 43 return 0;
44 } 44 }
45 45
@@ -69,7 +69,7 @@ static inline int match_tcp(const struct sk_buff *skb,
69static int match(const struct sk_buff *skb, 69static int match(const struct sk_buff *skb,
70 const struct net_device *in, const struct net_device *out, 70 const struct net_device *in, const struct net_device *out,
71 const struct xt_match *match, const void *matchinfo, 71 const struct xt_match *match, const void *matchinfo,
72 int offset, unsigned int protoff, int *hotdrop) 72 int offset, unsigned int protoff, bool *hotdrop)
73{ 73{
74 const struct ipt_ecn_info *info = matchinfo; 74 const struct ipt_ecn_info *info = matchinfo;
75 75
diff --git a/net/ipv4/netfilter/ipt_iprange.c b/net/ipv4/netfilter/ipt_iprange.c
index 33af9e940887..86f225c1d067 100644
--- a/net/ipv4/netfilter/ipt_iprange.c
+++ b/net/ipv4/netfilter/ipt_iprange.c
@@ -29,7 +29,7 @@ match(const struct sk_buff *skb,
29 const struct net_device *out, 29 const struct net_device *out,
30 const struct xt_match *match, 30 const struct xt_match *match,
31 const void *matchinfo, 31 const void *matchinfo,
32 int offset, unsigned int protoff, int *hotdrop) 32 int offset, unsigned int protoff, bool *hotdrop)
33{ 33{
34 const struct ipt_iprange_info *info = matchinfo; 34 const struct ipt_iprange_info *info = matchinfo;
35 const struct iphdr *iph = ip_hdr(skb); 35 const struct iphdr *iph = ip_hdr(skb);
diff --git a/net/ipv4/netfilter/ipt_owner.c b/net/ipv4/netfilter/ipt_owner.c
index 7fae9aa8944c..92be562c4aca 100644
--- a/net/ipv4/netfilter/ipt_owner.c
+++ b/net/ipv4/netfilter/ipt_owner.c
@@ -29,7 +29,7 @@ match(const struct sk_buff *skb,
29 const void *matchinfo, 29 const void *matchinfo,
30 int offset, 30 int offset,
31 unsigned int protoff, 31 unsigned int protoff,
32 int *hotdrop) 32 bool *hotdrop)
33{ 33{
34 const struct ipt_owner_info *info = matchinfo; 34 const struct ipt_owner_info *info = matchinfo;
35 35
diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c
index 15a9e8bbb7cc..81f1a017f311 100644
--- a/net/ipv4/netfilter/ipt_recent.c
+++ b/net/ipv4/netfilter/ipt_recent.c
@@ -173,7 +173,7 @@ static int
173ipt_recent_match(const struct sk_buff *skb, 173ipt_recent_match(const struct sk_buff *skb,
174 const struct net_device *in, const struct net_device *out, 174 const struct net_device *in, const struct net_device *out,
175 const struct xt_match *match, const void *matchinfo, 175 const struct xt_match *match, const void *matchinfo,
176 int offset, unsigned int protoff, int *hotdrop) 176 int offset, unsigned int protoff, bool *hotdrop)
177{ 177{
178 const struct ipt_recent_info *info = matchinfo; 178 const struct ipt_recent_info *info = matchinfo;
179 struct recent_table *t; 179 struct recent_table *t;
@@ -201,7 +201,7 @@ ipt_recent_match(const struct sk_buff *skb,
201 goto out; 201 goto out;
202 e = recent_entry_init(t, addr, ttl); 202 e = recent_entry_init(t, addr, ttl);
203 if (e == NULL) 203 if (e == NULL)
204 *hotdrop = 1; 204 *hotdrop = true;
205 ret ^= 1; 205 ret ^= 1;
206 goto out; 206 goto out;
207 } 207 }
diff --git a/net/ipv4/netfilter/ipt_tos.c b/net/ipv4/netfilter/ipt_tos.c
index d314844af12b..803ed4c35b55 100644
--- a/net/ipv4/netfilter/ipt_tos.c
+++ b/net/ipv4/netfilter/ipt_tos.c
@@ -26,7 +26,7 @@ match(const struct sk_buff *skb,
26 const void *matchinfo, 26 const void *matchinfo,
27 int offset, 27 int offset,
28 unsigned int protoff, 28 unsigned int protoff,
29 int *hotdrop) 29 bool *hotdrop)
30{ 30{
31 const struct ipt_tos_info *info = matchinfo; 31 const struct ipt_tos_info *info = matchinfo;
32 32
diff --git a/net/ipv4/netfilter/ipt_ttl.c b/net/ipv4/netfilter/ipt_ttl.c
index ab02d9e3139c..e7316b27d2c5 100644
--- a/net/ipv4/netfilter/ipt_ttl.c
+++ b/net/ipv4/netfilter/ipt_ttl.c
@@ -21,7 +21,7 @@ MODULE_LICENSE("GPL");
21static int match(const struct sk_buff *skb, 21static int match(const struct sk_buff *skb,
22 const struct net_device *in, const struct net_device *out, 22 const struct net_device *in, const struct net_device *out,
23 const struct xt_match *match, const void *matchinfo, 23 const struct xt_match *match, const void *matchinfo,
24 int offset, unsigned int protoff, int *hotdrop) 24 int offset, unsigned int protoff, bool *hotdrop)
25{ 25{
26 const struct ipt_ttl_info *info = matchinfo; 26 const struct ipt_ttl_info *info = matchinfo;
27 const u8 ttl = ip_hdr(skb)->ttl; 27 const u8 ttl = ip_hdr(skb)->ttl;