diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2008-10-08 05:35:13 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-10-08 05:35:13 -0400 |
commit | 19eda879a136889110c692dec4c2ab59e0e43cef (patch) | |
tree | f74da210c3a103a86f5b0257e99cfaa6e8834ab8 /net/bridge/netfilter/ebt_ip6.c | |
parent | 18219d3f7d6a5bc43825a41e0763158efbdb80d3 (diff) |
netfilter: change return types of check functions for Ebtables extensions
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/bridge/netfilter/ebt_ip6.c')
-rw-r--r-- | net/bridge/netfilter/ebt_ip6.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/bridge/netfilter/ebt_ip6.c b/net/bridge/netfilter/ebt_ip6.c index 554dd68637c..1230c9ee394 100644 --- a/net/bridge/netfilter/ebt_ip6.c +++ b/net/bridge/netfilter/ebt_ip6.c | |||
@@ -92,30 +92,30 @@ static int ebt_filter_ip6(const struct sk_buff *skb, | |||
92 | return EBT_MATCH; | 92 | return EBT_MATCH; |
93 | } | 93 | } |
94 | 94 | ||
95 | static int ebt_ip6_check(const char *tablename, unsigned int hookmask, | 95 | static bool ebt_ip6_check(const char *tablename, unsigned int hookmask, |
96 | const struct ebt_entry *e, void *data, unsigned int datalen) | 96 | const struct ebt_entry *e, void *data, unsigned int datalen) |
97 | { | 97 | { |
98 | struct ebt_ip6_info *info = (struct ebt_ip6_info *)data; | 98 | struct ebt_ip6_info *info = (struct ebt_ip6_info *)data; |
99 | 99 | ||
100 | if (e->ethproto != htons(ETH_P_IPV6) || e->invflags & EBT_IPROTO) | 100 | if (e->ethproto != htons(ETH_P_IPV6) || e->invflags & EBT_IPROTO) |
101 | return -EINVAL; | 101 | return false; |
102 | if (info->bitmask & ~EBT_IP6_MASK || info->invflags & ~EBT_IP6_MASK) | 102 | if (info->bitmask & ~EBT_IP6_MASK || info->invflags & ~EBT_IP6_MASK) |
103 | return -EINVAL; | 103 | return false; |
104 | if (info->bitmask & (EBT_IP6_DPORT | EBT_IP6_SPORT)) { | 104 | if (info->bitmask & (EBT_IP6_DPORT | EBT_IP6_SPORT)) { |
105 | if (info->invflags & EBT_IP6_PROTO) | 105 | if (info->invflags & EBT_IP6_PROTO) |
106 | return -EINVAL; | 106 | return false; |
107 | if (info->protocol != IPPROTO_TCP && | 107 | if (info->protocol != IPPROTO_TCP && |
108 | info->protocol != IPPROTO_UDP && | 108 | info->protocol != IPPROTO_UDP && |
109 | info->protocol != IPPROTO_UDPLITE && | 109 | info->protocol != IPPROTO_UDPLITE && |
110 | info->protocol != IPPROTO_SCTP && | 110 | info->protocol != IPPROTO_SCTP && |
111 | info->protocol != IPPROTO_DCCP) | 111 | info->protocol != IPPROTO_DCCP) |
112 | return -EINVAL; | 112 | return false; |
113 | } | 113 | } |
114 | if (info->bitmask & EBT_IP6_DPORT && info->dport[0] > info->dport[1]) | 114 | if (info->bitmask & EBT_IP6_DPORT && info->dport[0] > info->dport[1]) |
115 | return -EINVAL; | 115 | return false; |
116 | if (info->bitmask & EBT_IP6_SPORT && info->sport[0] > info->sport[1]) | 116 | if (info->bitmask & EBT_IP6_SPORT && info->sport[0] > info->sport[1]) |
117 | return -EINVAL; | 117 | return false; |
118 | return 0; | 118 | return true; |
119 | } | 119 | } |
120 | 120 | ||
121 | static struct ebt_match filter_ip6 = | 121 | static struct ebt_match filter_ip6 = |