netfilter: log: nf_log_packet() as real unified interface
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 18 Jun 2014 17:38:25 +0000 (19:38 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 27 Jun 2014 11:20:13 +0000 (13:20 +0200)
commitfab4085f4e248b8a80bb1dadbbacb2bacd8017c3
tree4d17c20935c24f77f08fe7807ce5a038d8a2cb13
parent83e96d443b372611adf19e4171d41deb1d8760cf
netfilter: log: nf_log_packet() as real unified interface

Before this patch, the nf_loginfo parameter specified the logging
configuration in case the specified default logger was loaded. This
patch updates the semantics of the nf_loginfo parameter in
nf_log_packet() which now indicates the logger that you explicitly
want to use.

Thus, nf_log_packet() is exposed as an unified interface which
internally routes the log message to the corresponding logger type
by family.

The module dependencies are expressed by the new nf_logger_find_get()
and nf_logger_put() functions which bump the logger module refcount.
Thus, you can not remove logger modules that are used by rules anymore.

Another important effect of this change is that the family specific
module is only loaded when required. Therefore, xt_LOG and nft_log
will just trigger the autoload of the nf_log_{ip,ip6} modules
according to the family.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_log.h
net/ipv4/netfilter/nf_log_ipv4.c
net/ipv6/netfilter/nf_log_ipv6.c
net/netfilter/nf_log.c
net/netfilter/nfnetlink_log.c
net/netfilter/xt_LOG.c