From efcfc0bc81d6b70fa78872526d122084c18ac268 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 18 Mar 2010 11:03:51 +0100 Subject: [PATCH] --- yaml --- r: 194911 b: refs/heads/master c: 4f948db1915ff05e4ce0fd98e6323db6a3ec0fc0 h: refs/heads/master i: 194909: 0a23dfb0a2892e2e65148bd5041656b460df1b78 194907: b2bf33265e1456d2f9615e21a60329fa3189d15a 194903: baf17df6dfc45476dea4ebd8cf7dad5708b79ec8 194895: 1debdf338e9f6efc7e2554f81a4069896e58d26d 194879: c03937e42406690cb2f9a8999fc48b0ac7d8868a v: v3 --- [refs] | 2 +- trunk/include/linux/netfilter/x_tables.h | 3 --- trunk/net/ipv6/netfilter/ip6t_hbh.c | 9 ++++++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 24269c5c7c80..053e5cde70d9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 16599786ae5e9d5f936706d2202d8c7224cd51ed +refs/heads/master: 4f948db1915ff05e4ce0fd98e6323db6a3ec0fc0 diff --git a/trunk/include/linux/netfilter/x_tables.h b/trunk/include/linux/netfilter/x_tables.h index c68ff82366b6..cf91473624e1 100644 --- a/trunk/include/linux/netfilter/x_tables.h +++ b/trunk/include/linux/netfilter/x_tables.h @@ -315,9 +315,6 @@ struct xt_match { /* Set this to THIS_MODULE if you are a module, otherwise NULL */ struct module *me; - /* Free to use by each match */ - unsigned long data; - const char *table; unsigned int matchsize; #ifdef CONFIG_COMPAT diff --git a/trunk/net/ipv6/netfilter/ip6t_hbh.c b/trunk/net/ipv6/netfilter/ip6t_hbh.c index cbe8dec9744b..82593c8bdc3e 100644 --- a/trunk/net/ipv6/netfilter/ip6t_hbh.c +++ b/trunk/net/ipv6/netfilter/ip6t_hbh.c @@ -41,6 +41,8 @@ MODULE_ALIAS("ip6t_dst"); * 5 -> RTALERT 2 x x */ +static struct xt_match hbh_mt6_reg[] __read_mostly; + static bool hbh_mt6(const struct sk_buff *skb, const struct xt_match_param *par) { @@ -58,7 +60,9 @@ hbh_mt6(const struct sk_buff *skb, const struct xt_match_param *par) unsigned int optlen; int err; - err = ipv6_find_hdr(skb, &ptr, par->match->data, NULL); + err = ipv6_find_hdr(skb, &ptr, + (par->match == &hbh_mt6_reg[0]) ? + NEXTHDR_HOP : NEXTHDR_DEST, NULL); if (err < 0) { if (err != -ENOENT) *par->hotdrop = true; @@ -179,13 +183,13 @@ static bool hbh_mt6_check(const struct xt_mtchk_param *par) static struct xt_match hbh_mt6_reg[] __read_mostly = { { + /* Note, hbh_mt6 relies on the order of hbh_mt6_reg */ .name = "hbh", .family = NFPROTO_IPV6, .match = hbh_mt6, .matchsize = sizeof(struct ip6t_opts), .checkentry = hbh_mt6_check, .me = THIS_MODULE, - .data = NEXTHDR_HOP, }, { .name = "dst", @@ -194,7 +198,6 @@ static struct xt_match hbh_mt6_reg[] __read_mostly = { .matchsize = sizeof(struct ip6t_opts), .checkentry = hbh_mt6_check, .me = THIS_MODULE, - .data = NEXTHDR_DEST, }, };