diff options
author | Evgeniy Polyakov <zbr@ioremap.net> | 2009-06-04 10:54:42 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-06-04 10:54:42 -0400 |
commit | a5e78820966e17c2316866e00047e4e7e5480f04 (patch) | |
tree | 9d9d814edced591d0cbaabf6cf5e91c54556e255 | |
parent | e34d5c1a4f9919a81b4ea4591d7383245f35cb8e (diff) |
netfilter: x_tables: added hook number into match extension parameter structure.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r-- | include/linux/netfilter/x_tables.h | 6 | ||||
-rw-r--r-- | net/bridge/netfilter/ebtables.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index c9efe039dc5..1030b759389 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -184,9 +184,10 @@ struct xt_counters_info | |||
184 | * @matchinfo: per-match data | 184 | * @matchinfo: per-match data |
185 | * @fragoff: packet is a fragment, this is the data offset | 185 | * @fragoff: packet is a fragment, this is the data offset |
186 | * @thoff: position of transport header relative to skb->data | 186 | * @thoff: position of transport header relative to skb->data |
187 | * @hotdrop: drop packet if we had inspection problems | 187 | * @hook: hook number given packet came from |
188 | * @family: Actual NFPROTO_* through which the function is invoked | 188 | * @family: Actual NFPROTO_* through which the function is invoked |
189 | * (helpful when match->family == NFPROTO_UNSPEC) | 189 | * (helpful when match->family == NFPROTO_UNSPEC) |
190 | * @hotdrop: drop packet if we had inspection problems | ||
190 | */ | 191 | */ |
191 | struct xt_match_param { | 192 | struct xt_match_param { |
192 | const struct net_device *in, *out; | 193 | const struct net_device *in, *out; |
@@ -194,8 +195,9 @@ struct xt_match_param { | |||
194 | const void *matchinfo; | 195 | const void *matchinfo; |
195 | int fragoff; | 196 | int fragoff; |
196 | unsigned int thoff; | 197 | unsigned int thoff; |
197 | bool *hotdrop; | 198 | unsigned int hooknum; |
198 | u_int8_t family; | 199 | u_int8_t family; |
200 | bool *hotdrop; | ||
199 | }; | 201 | }; |
200 | 202 | ||
201 | /** | 203 | /** |
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 24555834d43..37928d5f284 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c | |||
@@ -170,7 +170,7 @@ unsigned int ebt_do_table (unsigned int hook, struct sk_buff *skb, | |||
170 | mtpar.in = tgpar.in = in; | 170 | mtpar.in = tgpar.in = in; |
171 | mtpar.out = tgpar.out = out; | 171 | mtpar.out = tgpar.out = out; |
172 | mtpar.hotdrop = &hotdrop; | 172 | mtpar.hotdrop = &hotdrop; |
173 | tgpar.hooknum = hook; | 173 | mtpar.hooknum = tgpar.hooknum = hook; |
174 | 174 | ||
175 | read_lock_bh(&table->lock); | 175 | read_lock_bh(&table->lock); |
176 | private = table->private; | 176 | private = table->private; |
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 7b35c0b3841..5bf7c3f185d 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -343,7 +343,7 @@ ipt_do_table(struct sk_buff *skb, | |||
343 | mtpar.in = tgpar.in = in; | 343 | mtpar.in = tgpar.in = in; |
344 | mtpar.out = tgpar.out = out; | 344 | mtpar.out = tgpar.out = out; |
345 | mtpar.family = tgpar.family = NFPROTO_IPV4; | 345 | mtpar.family = tgpar.family = NFPROTO_IPV4; |
346 | tgpar.hooknum = hook; | 346 | mtpar.hooknum = tgpar.hooknum = hook; |
347 | 347 | ||
348 | IP_NF_ASSERT(table->valid_hooks & (1 << hook)); | 348 | IP_NF_ASSERT(table->valid_hooks & (1 << hook)); |
349 | xt_info_rdlock_bh(); | 349 | xt_info_rdlock_bh(); |
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 5164e0bf3bc..ced1f2c0cb6 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -369,7 +369,7 @@ ip6t_do_table(struct sk_buff *skb, | |||
369 | mtpar.in = tgpar.in = in; | 369 | mtpar.in = tgpar.in = in; |
370 | mtpar.out = tgpar.out = out; | 370 | mtpar.out = tgpar.out = out; |
371 | mtpar.family = tgpar.family = NFPROTO_IPV6; | 371 | mtpar.family = tgpar.family = NFPROTO_IPV6; |
372 | tgpar.hooknum = hook; | 372 | mtpar.hooknum = tgpar.hooknum = hook; |
373 | 373 | ||
374 | IP_NF_ASSERT(table->valid_hooks & (1 << hook)); | 374 | IP_NF_ASSERT(table->valid_hooks & (1 << hook)); |
375 | 375 | ||