diff options
author | Jan Engelhardt <jengelh@gmx.de> | 2007-07-08 01:16:26 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-11 01:16:59 -0400 |
commit | e1931b784a8de324abf310fa3b5e3f25d3988233 (patch) | |
tree | 3f553c7fed76a21efc96cc0eb4fa7bd69722f94d /net/ipv6 | |
parent | ccb79bdce71f2c04cfa9bfcbaf4d37e2f963d684 (diff) |
[NETFILTER]: x_tables: switch xt_target->checkentry to bool
Switch the return type of target checkentry functions 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/ip6t_HL.c | 8 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_LOG.c | 16 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_REJECT.c | 16 |
3 files changed, 20 insertions, 20 deletions
diff --git a/net/ipv6/netfilter/ip6t_HL.c b/net/ipv6/netfilter/ip6t_HL.c index 4115a576ba25..82966c09fd64 100644 --- a/net/ipv6/netfilter/ip6t_HL.c +++ b/net/ipv6/netfilter/ip6t_HL.c | |||
@@ -58,7 +58,7 @@ static unsigned int ip6t_hl_target(struct sk_buff **pskb, | |||
58 | return XT_CONTINUE; | 58 | return XT_CONTINUE; |
59 | } | 59 | } |
60 | 60 | ||
61 | static int ip6t_hl_checkentry(const char *tablename, | 61 | static bool ip6t_hl_checkentry(const char *tablename, |
62 | const void *entry, | 62 | const void *entry, |
63 | const struct xt_target *target, | 63 | const struct xt_target *target, |
64 | void *targinfo, | 64 | void *targinfo, |
@@ -69,14 +69,14 @@ static int ip6t_hl_checkentry(const char *tablename, | |||
69 | if (info->mode > IP6T_HL_MAXMODE) { | 69 | if (info->mode > IP6T_HL_MAXMODE) { |
70 | printk(KERN_WARNING "ip6t_HL: invalid or unknown Mode %u\n", | 70 | printk(KERN_WARNING "ip6t_HL: invalid or unknown Mode %u\n", |
71 | info->mode); | 71 | info->mode); |
72 | return 0; | 72 | return false; |
73 | } | 73 | } |
74 | if ((info->mode != IP6T_HL_SET) && (info->hop_limit == 0)) { | 74 | if ((info->mode != IP6T_HL_SET) && (info->hop_limit == 0)) { |
75 | printk(KERN_WARNING "ip6t_HL: increment/decrement doesn't " | 75 | printk(KERN_WARNING "ip6t_HL: increment/decrement doesn't " |
76 | "make sense with value 0\n"); | 76 | "make sense with value 0\n"); |
77 | return 0; | 77 | return false; |
78 | } | 78 | } |
79 | return 1; | 79 | return true; |
80 | } | 80 | } |
81 | 81 | ||
82 | static struct xt_target ip6t_HL = { | 82 | static struct xt_target ip6t_HL = { |
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c index 5bb9cd349350..aa4b9a14a11c 100644 --- a/net/ipv6/netfilter/ip6t_LOG.c +++ b/net/ipv6/netfilter/ip6t_LOG.c | |||
@@ -448,24 +448,24 @@ ip6t_log_target(struct sk_buff **pskb, | |||
448 | } | 448 | } |
449 | 449 | ||
450 | 450 | ||
451 | static int ip6t_log_checkentry(const char *tablename, | 451 | static bool ip6t_log_checkentry(const char *tablename, |
452 | const void *entry, | 452 | const void *entry, |
453 | const struct xt_target *target, | 453 | const struct xt_target *target, |
454 | void *targinfo, | 454 | void *targinfo, |
455 | unsigned int hook_mask) | 455 | unsigned int hook_mask) |
456 | { | 456 | { |
457 | const struct ip6t_log_info *loginfo = targinfo; | 457 | const struct ip6t_log_info *loginfo = targinfo; |
458 | 458 | ||
459 | if (loginfo->level >= 8) { | 459 | if (loginfo->level >= 8) { |
460 | DEBUGP("LOG: level %u >= 8\n", loginfo->level); | 460 | DEBUGP("LOG: level %u >= 8\n", loginfo->level); |
461 | return 0; | 461 | return false; |
462 | } | 462 | } |
463 | if (loginfo->prefix[sizeof(loginfo->prefix)-1] != '\0') { | 463 | if (loginfo->prefix[sizeof(loginfo->prefix)-1] != '\0') { |
464 | DEBUGP("LOG: prefix term %i\n", | 464 | DEBUGP("LOG: prefix term %i\n", |
465 | loginfo->prefix[sizeof(loginfo->prefix)-1]); | 465 | loginfo->prefix[sizeof(loginfo->prefix)-1]); |
466 | return 0; | 466 | return false; |
467 | } | 467 | } |
468 | return 1; | 468 | return true; |
469 | } | 469 | } |
470 | 470 | ||
471 | static struct xt_target ip6t_log_reg = { | 471 | static struct xt_target ip6t_log_reg = { |
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index cb3d2415a064..8639a0599bf5 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c | |||
@@ -221,27 +221,27 @@ static unsigned int reject6_target(struct sk_buff **pskb, | |||
221 | return NF_DROP; | 221 | return NF_DROP; |
222 | } | 222 | } |
223 | 223 | ||
224 | static int check(const char *tablename, | 224 | static bool check(const char *tablename, |
225 | const void *entry, | 225 | const void *entry, |
226 | const struct xt_target *target, | 226 | const struct xt_target *target, |
227 | void *targinfo, | 227 | void *targinfo, |
228 | unsigned int hook_mask) | 228 | unsigned int hook_mask) |
229 | { | 229 | { |
230 | const struct ip6t_reject_info *rejinfo = targinfo; | 230 | const struct ip6t_reject_info *rejinfo = targinfo; |
231 | const struct ip6t_entry *e = entry; | 231 | const struct ip6t_entry *e = entry; |
232 | 232 | ||
233 | if (rejinfo->with == IP6T_ICMP6_ECHOREPLY) { | 233 | if (rejinfo->with == IP6T_ICMP6_ECHOREPLY) { |
234 | printk("ip6t_REJECT: ECHOREPLY is not supported.\n"); | 234 | printk("ip6t_REJECT: ECHOREPLY is not supported.\n"); |
235 | return 0; | 235 | return false; |
236 | } else if (rejinfo->with == IP6T_TCP_RESET) { | 236 | } else if (rejinfo->with == IP6T_TCP_RESET) { |
237 | /* Must specify that it's a TCP packet */ | 237 | /* Must specify that it's a TCP packet */ |
238 | if (e->ipv6.proto != IPPROTO_TCP | 238 | if (e->ipv6.proto != IPPROTO_TCP |
239 | || (e->ipv6.invflags & XT_INV_PROTO)) { | 239 | || (e->ipv6.invflags & XT_INV_PROTO)) { |
240 | DEBUGP("ip6t_REJECT: TCP_RESET illegal for non-tcp\n"); | 240 | DEBUGP("ip6t_REJECT: TCP_RESET illegal for non-tcp\n"); |
241 | return 0; | 241 | return false; |
242 | } | 242 | } |
243 | } | 243 | } |
244 | return 1; | 244 | return true; |
245 | } | 245 | } |
246 | 246 | ||
247 | static struct xt_target ip6t_reject_reg = { | 247 | static struct xt_target ip6t_reject_reg = { |