]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ebtables: Fix extension lookup with identical name
authorPhil Sutter <phil@nwl.cc>
Mon, 11 Apr 2016 23:31:14 +0000 (01:31 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 12 Apr 2016 23:16:57 +0000 (01:16 +0200)
commitb83dcbe17c6ca7759608b5d28d189a3fb075d6fe
treebc56faa21bf6d61dd7b94f302c828ef0a50185c9
parent0ea1b1900202aac475af4a8968a76abea85b8679
netfilter: ebtables: Fix extension lookup with identical name

If a requested extension exists as module and is not loaded,
ebt_check_match() might accidentally use an NFPROTO_UNSPEC one with same
name and fail.

Reproduced with limit match: Given xt_limit and ebt_limit both built as
module, the following would fail:

  modprobe xt_limit
  ebtables -I INPUT --limit 1/s -j ACCEPT

The fix is to make ebt_check_match() distrust a found NFPROTO_UNSPEC
extension and retry after requesting an appropriate module.

Cc: Florian Westphal <fw@strlen.de>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/netfilter/ebtables.c