netfilter: nf_tables: Add audit support to log statement

This extends log statement to support the behaviour achieved with
AUDIT target in iptables.

Audit logging is enabled via a pseudo log level 8. In this case any
other settings like log prefix are ignored since audit log format is
fixed.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Phil Sutter
2018-05-30 11:06:22 +02:00
committed by Pablo Neira Ayuso
parent 554ced0a6e
commit 1a893b44de
2 changed files with 96 additions and 1 deletions

View File

@@ -1080,6 +1080,11 @@ enum nft_log_attributes {
};
#define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1)
/**
* LOGLEVEL_AUDIT - a pseudo log level enabling audit logging
*/
#define LOGLEVEL_AUDIT 8
/**
* enum nft_queue_attributes - nf_tables queue expression netlink attributes
*