diff options
author | 2010-03-18 00:44:52 +0100 | |
---|---|---|
committer | 2010-03-18 14:20:06 +0100 | |
commit | aa5fa3185791aac71c9172d4fda3e8729164b5d1 (patch) | |
tree | ed49f5c01d7bdb0e994243c3a0888b4a54bb6981 /net/netfilter/xt_recent.c | |
parent | netfilter: xtables: resort osf kconfig text (diff) | |
download | linux-aa5fa3185791aac71c9172d4fda3e8729164b5d1.tar.gz linux-aa5fa3185791aac71c9172d4fda3e8729164b5d1.tar.bz2 linux-aa5fa3185791aac71c9172d4fda3e8729164b5d1.zip |
netfilter: xtables: make use of caller family rather than match family
The matches can have .family = NFPROTO_UNSPEC, and though that is not
the case for the touched modules, it seems better to just use the
nfproto from the caller.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/netfilter/xt_recent.c')
-rw-r--r-- | net/netfilter/xt_recent.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c index d2e7c80cd3c3..a0ea1a21c470 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c @@ -233,7 +233,7 @@ recent_mt(const struct sk_buff *skb, const struct xt_match_param *par) u_int8_t ttl; bool ret = info->invert; - if (par->match->family == NFPROTO_IPV4) { + if (par->family == NFPROTO_IPV4) { const struct iphdr *iph = ip_hdr(skb); if (info->side == XT_RECENT_DEST) @@ -259,12 +259,12 @@ recent_mt(const struct sk_buff *skb, const struct xt_match_param *par) spin_lock_bh(&recent_lock); t = recent_table_lookup(recent_net, info->name); - e = recent_entry_lookup(t, &addr, par->match->family, + e = recent_entry_lookup(t, &addr, par->family, (info->check_set & XT_RECENT_TTL) ? ttl : 0); if (e == NULL) { if (!(info->check_set & XT_RECENT_SET)) goto out; - e = recent_entry_init(t, &addr, par->match->family, ttl); + e = recent_entry_init(t, &addr, par->family, ttl); if (e == NULL) *par->hotdrop = true; ret = !ret; |