Commit 656caff20e12ba6e07b4bf342641df5ab33b4e49
Committed by
David S. Miller
1 parent
47e0e1ca13
Exists in
master
and in
39 other branches
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>
Showing 1 changed file with 8 additions and 0 deletions Side-by-side Diff
net/netfilter/x_tables.c
... | ... | @@ -273,6 +273,10 @@ |
273 | 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 | 280 | return have_rev; |
277 | 281 | } |
278 | 282 | |
... | ... | @@ -289,6 +293,10 @@ |
289 | 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 | 300 | return have_rev; |
293 | 301 | } |
294 | 302 |