]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
netfilter: x_tables: added hook number into match extension parameter structure.
authorEvgeniy Polyakov <zbr@ioremap.net>
Thu, 4 Jun 2009 14:54:42 +0000 (16:54 +0200)
committerPatrick McHardy <kaber@trash.net>
Thu, 4 Jun 2009 14:54:42 +0000 (16:54 +0200)
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
include/linux/netfilter/x_tables.h
net/bridge/netfilter/ebtables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c

index c9efe039dc57c4e2c2dce6ec11751a3d6d1c9819..1030b7593898d440498b221cf9828809076bc6da 100644 (file)
@@ -184,9 +184,10 @@ struct xt_counters_info
  * @matchinfo: per-match data
  * @fragoff:   packet is a fragment, this is the data offset
  * @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
  *             (helpful when match->family == NFPROTO_UNSPEC)
+ * @hotdrop:   drop packet if we had inspection problems
  */
 struct xt_match_param {
        const struct net_device *in, *out;
@@ -194,8 +195,9 @@ struct xt_match_param {
        const void *matchinfo;
        int fragoff;
        unsigned int thoff;
-       bool *hotdrop;
+       unsigned int hooknum;
        u_int8_t family;
+       bool *hotdrop;
 };
 
 /**
index 24555834d4315d049f03bb59092daf77ecbb4647..37928d5f284024b871604462fbfa04bc037c61a9 100644 (file)
@@ -170,7 +170,7 @@ unsigned int ebt_do_table (unsigned int hook, struct sk_buff *skb,
        mtpar.in      = tgpar.in  = in;
        mtpar.out     = tgpar.out = out;
        mtpar.hotdrop = &hotdrop;
-       tgpar.hooknum = hook;
+       mtpar.hooknum = tgpar.hooknum = hook;
 
        read_lock_bh(&table->lock);
        private = table->private;
index 7b35c0b3841bce70ece2fcd1adf3a61122cd5a3f..5bf7c3f185da576d37ca0c0271ca2df71a61a1f9 100644 (file)
@@ -343,7 +343,7 @@ ipt_do_table(struct sk_buff *skb,
        mtpar.in      = tgpar.in  = in;
        mtpar.out     = tgpar.out = out;
        mtpar.family  = tgpar.family = NFPROTO_IPV4;
-       tgpar.hooknum = hook;
+       mtpar.hooknum = tgpar.hooknum = hook;
 
        IP_NF_ASSERT(table->valid_hooks & (1 << hook));
        xt_info_rdlock_bh();
index 5164e0bf3bccd857fea93037e87121e7f4eb0e45..ced1f2c0cb6594f80834c8b422982486b4d3a406 100644 (file)
@@ -369,7 +369,7 @@ ip6t_do_table(struct sk_buff *skb,
        mtpar.in      = tgpar.in  = in;
        mtpar.out     = tgpar.out = out;
        mtpar.family  = tgpar.family = NFPROTO_IPV6;
-       tgpar.hooknum = hook;
+       mtpar.hooknum = tgpar.hooknum = hook;
 
        IP_NF_ASSERT(table->valid_hooks & (1 << hook));