]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: Factor out the hook list selection from nf_register_hook
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 10 Jul 2015 23:14:30 +0000 (18:14 -0500)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 15 Jul 2015 15:51:44 +0000 (17:51 +0200)
commit27f1b30f74231d3662c0a983f7045dd27616d9f3
tree681091d6de00c9a7f9291e3172338d1d2f5e4a11
parent6ced59d131ae68c018dd35adee41edc493464111
netfilter: Factor out the hook list selection from nf_register_hook

- Add a new function find_nf_hook_list to select the nf_hook_list

- Fail nf_register_hook when asked for a per netdevice hook list when
  support for per netdevice hook lists is not built into the kernel.

- Move the hook list head selection outside of nf_hook_mutex as
  nothing in the selection requires the hook list, and error handling
  is simpler if a mutex is not held.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/core.c