Skip to content

Commit 656caff

Browse files
kaberdavem330
authored andcommitted
netfilter 04/09: x_tables: fix match/target revision lookup
Commit 55b69e9 (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>
1 parent 47e0e1c commit 656caff

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

net/netfilter/x_tables.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ static int match_revfn(u8 af, const char *name, u8 revision, int *bestp)
273273
have_rev = 1;
274274
}
275275
}
276+
277+
if (af != NFPROTO_UNSPEC && !have_rev)
278+
return match_revfn(NFPROTO_UNSPEC, name, revision, bestp);
279+
276280
return have_rev;
277281
}
278282

@@ -289,6 +293,10 @@ static int target_revfn(u8 af, const char *name, u8 revision, int *bestp)
289293
have_rev = 1;
290294
}
291295
}
296+
297+
if (af != NFPROTO_UNSPEC && !have_rev)
298+
return target_revfn(NFPROTO_UNSPEC, name, revision, bestp);
299+
292300
return have_rev;
293301
}
294302

0 commit comments

Comments
 (0)