aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
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/ipv6
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/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_tables.c12
-rw-r--r--net/ipv6/netfilter/ip6t_ah.c6
-rw-r--r--net/ipv6/netfilter/ip6t_eui64.c4
-rw-r--r--net/ipv6/netfilter/ip6t_frag.c6
-rw-r--r--net/ipv6/netfilter/ip6t_hbh.c6
-rw-r--r--net/ipv6/netfilter/ip6t_hl.c2
-rw-r--r--net/ipv6/netfilter/ip6t_ipv6header.c2
-rw-r--r--net/ipv6/netfilter/ip6t_mh.c6
-rw-r--r--net/ipv6/netfilter/ip6t_owner.c2
-rw-r--r--net/ipv6/netfilter/ip6t_rt.c6
10 files changed, 26 insertions, 26 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 9aa624026688..13c66a75c21c 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -102,7 +102,7 @@ ip6_packet_match(const struct sk_buff *skb,
102 const char *outdev, 102 const char *outdev,
103 const struct ip6t_ip6 *ip6info, 103 const struct ip6t_ip6 *ip6info,
104 unsigned int *protoff, 104 unsigned int *protoff,
105 int *fragoff, int *hotdrop) 105 int *fragoff, bool *hotdrop)
106{ 106{
107 size_t i; 107 size_t i;
108 unsigned long ret; 108 unsigned long ret;
@@ -162,7 +162,7 @@ ip6_packet_match(const struct sk_buff *skb,
162 protohdr = ipv6_find_hdr(skb, protoff, -1, &_frag_off); 162 protohdr = ipv6_find_hdr(skb, protoff, -1, &_frag_off);
163 if (protohdr < 0) { 163 if (protohdr < 0) {
164 if (_frag_off == 0) 164 if (_frag_off == 0)
165 *hotdrop = 1; 165 *hotdrop = true;
166 return 0; 166 return 0;
167 } 167 }
168 *fragoff = _frag_off; 168 *fragoff = _frag_off;
@@ -225,7 +225,7 @@ int do_match(struct ip6t_entry_match *m,
225 const struct net_device *out, 225 const struct net_device *out,
226 int offset, 226 int offset,
227 unsigned int protoff, 227 unsigned int protoff,
228 int *hotdrop) 228 bool *hotdrop)
229{ 229{
230 /* Stop iteration if it doesn't match */ 230 /* Stop iteration if it doesn't match */
231 if (!m->u.kernel.match->match(skb, in, out, m->u.kernel.match, m->data, 231 if (!m->u.kernel.match->match(skb, in, out, m->u.kernel.match, m->data,
@@ -252,7 +252,7 @@ ip6t_do_table(struct sk_buff **pskb,
252 static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long)))); 252 static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
253 int offset = 0; 253 int offset = 0;
254 unsigned int protoff = 0; 254 unsigned int protoff = 0;
255 int hotdrop = 0; 255 bool hotdrop = false;
256 /* Initializing verdict to NF_DROP keeps gcc happy. */ 256 /* Initializing verdict to NF_DROP keeps gcc happy. */
257 unsigned int verdict = NF_DROP; 257 unsigned int verdict = NF_DROP;
258 const char *indev, *outdev; 258 const char *indev, *outdev;
@@ -1299,7 +1299,7 @@ icmp6_match(const struct sk_buff *skb,
1299 const void *matchinfo, 1299 const void *matchinfo,
1300 int offset, 1300 int offset,
1301 unsigned int protoff, 1301 unsigned int protoff,
1302 int *hotdrop) 1302 bool *hotdrop)
1303{ 1303{
1304 struct icmp6hdr _icmp, *ic; 1304 struct icmp6hdr _icmp, *ic;
1305 const struct ip6t_icmp *icmpinfo = matchinfo; 1305 const struct ip6t_icmp *icmpinfo = matchinfo;
@@ -1313,7 +1313,7 @@ icmp6_match(const struct sk_buff *skb,
1313 /* We've been asked to examine this packet, and we 1313 /* We've been asked to examine this packet, and we
1314 can't. Hence, no choice but to drop. */ 1314 can't. Hence, no choice but to drop. */
1315 duprintf("Dropping evil ICMP tinygram.\n"); 1315 duprintf("Dropping evil ICMP tinygram.\n");
1316 *hotdrop = 1; 1316 *hotdrop = true;
1317 return 0; 1317 return 0;
1318 } 1318 }
1319 1319
diff --git a/net/ipv6/netfilter/ip6t_ah.c b/net/ipv6/netfilter/ip6t_ah.c
index d3c154371b41..27b7bd279c0e 100644
--- a/net/ipv6/netfilter/ip6t_ah.c
+++ b/net/ipv6/netfilter/ip6t_ah.c
@@ -49,7 +49,7 @@ match(const struct sk_buff *skb,
49 const void *matchinfo, 49 const void *matchinfo,
50 int offset, 50 int offset,
51 unsigned int protoff, 51 unsigned int protoff,
52 int *hotdrop) 52 bool *hotdrop)
53{ 53{
54 struct ip_auth_hdr *ah, _ah; 54 struct ip_auth_hdr *ah, _ah;
55 const struct ip6t_ah *ahinfo = matchinfo; 55 const struct ip6t_ah *ahinfo = matchinfo;
@@ -60,13 +60,13 @@ match(const struct sk_buff *skb,
60 err = ipv6_find_hdr(skb, &ptr, NEXTHDR_AUTH, NULL); 60 err = ipv6_find_hdr(skb, &ptr, NEXTHDR_AUTH, NULL);
61 if (err < 0) { 61 if (err < 0) {
62 if (err != -ENOENT) 62 if (err != -ENOENT)
63 *hotdrop = 1; 63 *hotdrop = true;
64 return 0; 64 return 0;
65 } 65 }
66 66
67 ah = skb_header_pointer(skb, ptr, sizeof(_ah), &_ah); 67 ah = skb_header_pointer(skb, ptr, sizeof(_ah), &_ah);
68 if (ah == NULL) { 68 if (ah == NULL) {
69 *hotdrop = 1; 69 *hotdrop = true;
70 return 0; 70 return 0;
71 } 71 }
72 72
diff --git a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c
index 0f3dd932f0a6..69e79e19040e 100644
--- a/net/ipv6/netfilter/ip6t_eui64.c
+++ b/net/ipv6/netfilter/ip6t_eui64.c
@@ -27,7 +27,7 @@ match(const struct sk_buff *skb,
27 const void *matchinfo, 27 const void *matchinfo,
28 int offset, 28 int offset,
29 unsigned int protoff, 29 unsigned int protoff,
30 int *hotdrop) 30 bool *hotdrop)
31{ 31{
32 unsigned char eui64[8]; 32 unsigned char eui64[8];
33 int i = 0; 33 int i = 0;
@@ -35,7 +35,7 @@ match(const struct sk_buff *skb,
35 if (!(skb_mac_header(skb) >= skb->head && 35 if (!(skb_mac_header(skb) >= skb->head &&
36 (skb_mac_header(skb) + ETH_HLEN) <= skb->data) && 36 (skb_mac_header(skb) + ETH_HLEN) <= skb->data) &&
37 offset != 0) { 37 offset != 0) {
38 *hotdrop = 1; 38 *hotdrop = true;
39 return 0; 39 return 0;
40 } 40 }
41 41
diff --git a/net/ipv6/netfilter/ip6t_frag.c b/net/ipv6/netfilter/ip6t_frag.c
index 5a5da71321b6..740fdcafa5f3 100644
--- a/net/ipv6/netfilter/ip6t_frag.c
+++ b/net/ipv6/netfilter/ip6t_frag.c
@@ -48,7 +48,7 @@ match(const struct sk_buff *skb,
48 const void *matchinfo, 48 const void *matchinfo,
49 int offset, 49 int offset,
50 unsigned int protoff, 50 unsigned int protoff,
51 int *hotdrop) 51 bool *hotdrop)
52{ 52{
53 struct frag_hdr _frag, *fh; 53 struct frag_hdr _frag, *fh;
54 const struct ip6t_frag *fraginfo = matchinfo; 54 const struct ip6t_frag *fraginfo = matchinfo;
@@ -58,13 +58,13 @@ match(const struct sk_buff *skb,
58 err = ipv6_find_hdr(skb, &ptr, NEXTHDR_FRAGMENT, NULL); 58 err = ipv6_find_hdr(skb, &ptr, NEXTHDR_FRAGMENT, NULL);
59 if (err < 0) { 59 if (err < 0) {
60 if (err != -ENOENT) 60 if (err != -ENOENT)
61 *hotdrop = 1; 61 *hotdrop = true;
62 return 0; 62 return 0;
63 } 63 }
64 64
65 fh = skb_header_pointer(skb, ptr, sizeof(_frag), &_frag); 65 fh = skb_header_pointer(skb, ptr, sizeof(_frag), &_frag);
66 if (fh == NULL) { 66 if (fh == NULL) {
67 *hotdrop = 1; 67 *hotdrop = true;
68 return 0; 68 return 0;
69 } 69 }
70 70
diff --git a/net/ipv6/netfilter/ip6t_hbh.c b/net/ipv6/netfilter/ip6t_hbh.c
index d2373c7cd354..5633de160c6d 100644
--- a/net/ipv6/netfilter/ip6t_hbh.c
+++ b/net/ipv6/netfilter/ip6t_hbh.c
@@ -55,7 +55,7 @@ match(const struct sk_buff *skb,
55 const void *matchinfo, 55 const void *matchinfo,
56 int offset, 56 int offset,
57 unsigned int protoff, 57 unsigned int protoff,
58 int *hotdrop) 58 bool *hotdrop)
59{ 59{
60 struct ipv6_opt_hdr _optsh, *oh; 60 struct ipv6_opt_hdr _optsh, *oh;
61 const struct ip6t_opts *optinfo = matchinfo; 61 const struct ip6t_opts *optinfo = matchinfo;
@@ -71,13 +71,13 @@ match(const struct sk_buff *skb,
71 err = ipv6_find_hdr(skb, &ptr, match->data, NULL); 71 err = ipv6_find_hdr(skb, &ptr, match->data, NULL);
72 if (err < 0) { 72 if (err < 0) {
73 if (err != -ENOENT) 73 if (err != -ENOENT)
74 *hotdrop = 1; 74 *hotdrop = true;
75 return 0; 75 return 0;
76 } 76 }
77 77
78 oh = skb_header_pointer(skb, ptr, sizeof(_optsh), &_optsh); 78 oh = skb_header_pointer(skb, ptr, sizeof(_optsh), &_optsh);
79 if (oh == NULL) { 79 if (oh == NULL) {
80 *hotdrop = 1; 80 *hotdrop = true;
81 return 0; 81 return 0;
82 } 82 }
83 83
diff --git a/net/ipv6/netfilter/ip6t_hl.c b/net/ipv6/netfilter/ip6t_hl.c
index d606c0e6d6fd..cbf49cffa067 100644
--- a/net/ipv6/netfilter/ip6t_hl.c
+++ b/net/ipv6/netfilter/ip6t_hl.c
@@ -22,7 +22,7 @@ MODULE_LICENSE("GPL");
22static int match(const struct sk_buff *skb, 22static int match(const struct sk_buff *skb,
23 const struct net_device *in, const struct net_device *out, 23 const struct net_device *in, const struct net_device *out,
24 const struct xt_match *match, const void *matchinfo, 24 const struct xt_match *match, const void *matchinfo,
25 int offset, unsigned int protoff, int *hotdrop) 25 int offset, unsigned int protoff, bool *hotdrop)
26{ 26{
27 const struct ip6t_hl_info *info = matchinfo; 27 const struct ip6t_hl_info *info = matchinfo;
28 const struct ipv6hdr *ip6h = ipv6_hdr(skb); 28 const struct ipv6hdr *ip6h = ipv6_hdr(skb);
diff --git a/net/ipv6/netfilter/ip6t_ipv6header.c b/net/ipv6/netfilter/ip6t_ipv6header.c
index fd6a0869099b..469dec27c649 100644
--- a/net/ipv6/netfilter/ip6t_ipv6header.c
+++ b/net/ipv6/netfilter/ip6t_ipv6header.c
@@ -34,7 +34,7 @@ ipv6header_match(const struct sk_buff *skb,
34 const void *matchinfo, 34 const void *matchinfo,
35 int offset, 35 int offset,
36 unsigned int protoff, 36 unsigned int protoff,
37 int *hotdrop) 37 bool *hotdrop)
38{ 38{
39 const struct ip6t_ipv6header_info *info = matchinfo; 39 const struct ip6t_ipv6header_info *info = matchinfo;
40 unsigned int temp; 40 unsigned int temp;
diff --git a/net/ipv6/netfilter/ip6t_mh.c b/net/ipv6/netfilter/ip6t_mh.c
index c2a909893a64..c27647b6c274 100644
--- a/net/ipv6/netfilter/ip6t_mh.c
+++ b/net/ipv6/netfilter/ip6t_mh.c
@@ -48,7 +48,7 @@ match(const struct sk_buff *skb,
48 const void *matchinfo, 48 const void *matchinfo,
49 int offset, 49 int offset,
50 unsigned int protoff, 50 unsigned int protoff,
51 int *hotdrop) 51 bool *hotdrop)
52{ 52{
53 struct ip6_mh _mh, *mh; 53 struct ip6_mh _mh, *mh;
54 const struct ip6t_mh *mhinfo = matchinfo; 54 const struct ip6t_mh *mhinfo = matchinfo;
@@ -62,14 +62,14 @@ match(const struct sk_buff *skb,
62 /* We've been asked to examine this packet, and we 62 /* We've been asked to examine this packet, and we
63 can't. Hence, no choice but to drop. */ 63 can't. Hence, no choice but to drop. */
64 duprintf("Dropping evil MH tinygram.\n"); 64 duprintf("Dropping evil MH tinygram.\n");
65 *hotdrop = 1; 65 *hotdrop = true;
66 return 0; 66 return 0;
67 } 67 }
68 68
69 if (mh->ip6mh_proto != IPPROTO_NONE) { 69 if (mh->ip6mh_proto != IPPROTO_NONE) {
70 duprintf("Dropping invalid MH Payload Proto: %u\n", 70 duprintf("Dropping invalid MH Payload Proto: %u\n",
71 mh->ip6mh_proto); 71 mh->ip6mh_proto);
72 *hotdrop = 1; 72 *hotdrop = true;
73 return 0; 73 return 0;
74 } 74 }
75 75
diff --git a/net/ipv6/netfilter/ip6t_owner.c b/net/ipv6/netfilter/ip6t_owner.c
index 43738bba00b5..f90f7c32cc9e 100644
--- a/net/ipv6/netfilter/ip6t_owner.c
+++ b/net/ipv6/netfilter/ip6t_owner.c
@@ -31,7 +31,7 @@ match(const struct sk_buff *skb,
31 const void *matchinfo, 31 const void *matchinfo,
32 int offset, 32 int offset,
33 unsigned int protoff, 33 unsigned int protoff,
34 int *hotdrop) 34 bool *hotdrop)
35{ 35{
36 const struct ip6t_owner_info *info = matchinfo; 36 const struct ip6t_owner_info *info = matchinfo;
37 37
diff --git a/net/ipv6/netfilter/ip6t_rt.c b/net/ipv6/netfilter/ip6t_rt.c
index 81ab00d8c182..2bb88214cfda 100644
--- a/net/ipv6/netfilter/ip6t_rt.c
+++ b/net/ipv6/netfilter/ip6t_rt.c
@@ -50,7 +50,7 @@ match(const struct sk_buff *skb,
50 const void *matchinfo, 50 const void *matchinfo,
51 int offset, 51 int offset,
52 unsigned int protoff, 52 unsigned int protoff,
53 int *hotdrop) 53 bool *hotdrop)
54{ 54{
55 struct ipv6_rt_hdr _route, *rh; 55 struct ipv6_rt_hdr _route, *rh;
56 const struct ip6t_rt *rtinfo = matchinfo; 56 const struct ip6t_rt *rtinfo = matchinfo;
@@ -64,13 +64,13 @@ match(const struct sk_buff *skb,
64 err = ipv6_find_hdr(skb, &ptr, NEXTHDR_ROUTING, NULL); 64 err = ipv6_find_hdr(skb, &ptr, NEXTHDR_ROUTING, NULL);
65 if (err < 0) { 65 if (err < 0) {
66 if (err != -ENOENT) 66 if (err != -ENOENT)
67 *hotdrop = 1; 67 *hotdrop = true;
68 return 0; 68 return 0;
69 } 69 }
70 70
71 rh = skb_header_pointer(skb, ptr, sizeof(_route), &_route); 71 rh = skb_header_pointer(skb, ptr, sizeof(_route), &_route);
72 if (rh == NULL) { 72 if (rh == NULL) {
73 *hotdrop = 1; 73 *hotdrop = true;
74 return 0; 74 return 0;
75 } 75 }
76 76