mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
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>
This commit is contained in:
parent
e34d5c1a4f
commit
a5e7882096
4 changed files with 7 additions and 5 deletions
|
@ -184,9 +184,10 @@ struct xt_counters_info
|
||||||
* @matchinfo: per-match data
|
* @matchinfo: per-match data
|
||||||
* @fragoff: packet is a fragment, this is the data offset
|
* @fragoff: packet is a fragment, this is the data offset
|
||||||
* @thoff: position of transport header relative to skb->data
|
* @thoff: position of transport header relative to skb->data
|
||||||
* @hotdrop: drop packet if we had inspection problems
|
* @hook: hook number given packet came from
|
||||||
* @family: Actual NFPROTO_* through which the function is invoked
|
* @family: Actual NFPROTO_* through which the function is invoked
|
||||||
* (helpful when match->family == NFPROTO_UNSPEC)
|
* (helpful when match->family == NFPROTO_UNSPEC)
|
||||||
|
* @hotdrop: drop packet if we had inspection problems
|
||||||
*/
|
*/
|
||||||
struct xt_match_param {
|
struct xt_match_param {
|
||||||
const struct net_device *in, *out;
|
const struct net_device *in, *out;
|
||||||
|
@ -194,8 +195,9 @@ struct xt_match_param {
|
||||||
const void *matchinfo;
|
const void *matchinfo;
|
||||||
int fragoff;
|
int fragoff;
|
||||||
unsigned int thoff;
|
unsigned int thoff;
|
||||||
bool *hotdrop;
|
unsigned int hooknum;
|
||||||
u_int8_t family;
|
u_int8_t family;
|
||||||
|
bool *hotdrop;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -170,7 +170,7 @@ unsigned int ebt_do_table (unsigned int hook, struct sk_buff *skb,
|
||||||
mtpar.in = tgpar.in = in;
|
mtpar.in = tgpar.in = in;
|
||||||
mtpar.out = tgpar.out = out;
|
mtpar.out = tgpar.out = out;
|
||||||
mtpar.hotdrop = &hotdrop;
|
mtpar.hotdrop = &hotdrop;
|
||||||
tgpar.hooknum = hook;
|
mtpar.hooknum = tgpar.hooknum = hook;
|
||||||
|
|
||||||
read_lock_bh(&table->lock);
|
read_lock_bh(&table->lock);
|
||||||
private = table->private;
|
private = table->private;
|
||||||
|
|
|
@ -343,7 +343,7 @@ ipt_do_table(struct sk_buff *skb,
|
||||||
mtpar.in = tgpar.in = in;
|
mtpar.in = tgpar.in = in;
|
||||||
mtpar.out = tgpar.out = out;
|
mtpar.out = tgpar.out = out;
|
||||||
mtpar.family = tgpar.family = NFPROTO_IPV4;
|
mtpar.family = tgpar.family = NFPROTO_IPV4;
|
||||||
tgpar.hooknum = hook;
|
mtpar.hooknum = tgpar.hooknum = hook;
|
||||||
|
|
||||||
IP_NF_ASSERT(table->valid_hooks & (1 << hook));
|
IP_NF_ASSERT(table->valid_hooks & (1 << hook));
|
||||||
xt_info_rdlock_bh();
|
xt_info_rdlock_bh();
|
||||||
|
|
|
@ -369,7 +369,7 @@ ip6t_do_table(struct sk_buff *skb,
|
||||||
mtpar.in = tgpar.in = in;
|
mtpar.in = tgpar.in = in;
|
||||||
mtpar.out = tgpar.out = out;
|
mtpar.out = tgpar.out = out;
|
||||||
mtpar.family = tgpar.family = NFPROTO_IPV6;
|
mtpar.family = tgpar.family = NFPROTO_IPV6;
|
||||||
tgpar.hooknum = hook;
|
mtpar.hooknum = tgpar.hooknum = hook;
|
||||||
|
|
||||||
IP_NF_ASSERT(table->valid_hooks & (1 << hook));
|
IP_NF_ASSERT(table->valid_hooks & (1 << hook));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue