diff options
author | Patrick McHardy <kaber@trash.net> | 2009-01-11 19:06:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-13 00:18:34 -0500 |
commit | 656caff20e12ba6e07b4bf342641df5ab33b4e49 (patch) | |
tree | 67170a077bc0b4e5175afea32758ffd322df15f8 /net | |
parent | 47e0e1ca13d64eeeb687995fbe4e239e743d7544 (diff) |
netfilter 04/09: x_tables: fix match/target revision lookup
Commit 55b69e91 (netfilter: implement NFPROTO_UNSPEC as a wildcard
for extensions) broke revision probing for matches and targets that
are registered with NFPROTO_UNSPEC.
Fix by continuing the search on the NFPROTO_UNSPEC list if nothing
is found on the af-specific lists.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/x_tables.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 89837a4eef76..bfbf521f6ea5 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c | |||
@@ -273,6 +273,10 @@ static int match_revfn(u8 af, const char *name, u8 revision, int *bestp) | |||
273 | have_rev = 1; | 273 | have_rev = 1; |
274 | } | 274 | } |
275 | } | 275 | } |
276 | |||
277 | if (af != NFPROTO_UNSPEC && !have_rev) | ||
278 | return match_revfn(NFPROTO_UNSPEC, name, revision, bestp); | ||
279 | |||
276 | return have_rev; | 280 | return have_rev; |
277 | } | 281 | } |
278 | 282 | ||
@@ -289,6 +293,10 @@ static int target_revfn(u8 af, const char *name, u8 revision, int *bestp) | |||
289 | have_rev = 1; | 293 | have_rev = 1; |
290 | } | 294 | } |
291 | } | 295 | } |
296 | |||
297 | if (af != NFPROTO_UNSPEC && !have_rev) | ||
298 | return target_revfn(NFPROTO_UNSPEC, name, revision, bestp); | ||
299 | |||
292 | return have_rev; | 300 | return have_rev; |
293 | } | 301 | } |
294 | 302 | ||