aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-06-03 06:06:57 -0400
committerDavid S. Miller <davem@davemloft.net>2018-06-07 16:14:00 -0400
commit7eced5ab5a7366ee7ca5360b3eca9d220c2b2887 (patch)
tree9ef59ad2d7eaf8c25cd2b4e85eeadddcb0c67485 /include/uapi/linux
parent3036bc45364f98515a2c446d7fac2c34dcfbeff4 (diff)
netfilter: nf_tables: add NFT_LOGLEVEL_* enumeration and use it
This is internal, not exposed through uapi, and although it maps with userspace LOG_*, with the introduction of LOGLEVEL_AUDIT we are incurring in namespace pollution. This patch adds the NFT_LOGLEVEL_ enumeration and use it from nft_log. Fixes: 1a893b44de45 ("netfilter: nf_tables: Add audit support to log statement") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Phil Sutter <phil@nwl.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index ae00a3c49b8a..c9bf74b94f37 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -1099,9 +1099,31 @@ enum nft_log_attributes {
1099#define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1) 1099#define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1)
1100 1100
1101/** 1101/**
1102 * LOGLEVEL_AUDIT - a pseudo log level enabling audit logging 1102 * enum nft_log_level - nf_tables log levels
1103 */ 1103 *
1104#define LOGLEVEL_AUDIT 8 1104 * @NFT_LOGLEVEL_EMERG: system is unusable
1105 * @NFT_LOGLEVEL_ALERT: action must be taken immediately
1106 * @NFT_LOGLEVEL_CRIT: critical conditions
1107 * @NFT_LOGLEVEL_ERR: error conditions
1108 * @NFT_LOGLEVEL_WARNING: warning conditions
1109 * @NFT_LOGLEVEL_NOTICE: normal but significant condition
1110 * @NFT_LOGLEVEL_INFO: informational
1111 * @NFT_LOGLEVEL_DEBUG: debug-level messages
1112 * @NFT_LOGLEVEL_AUDIT: enabling audit logging
1113 */
1114enum nft_log_level {
1115 NFT_LOGLEVEL_EMERG,
1116 NFT_LOGLEVEL_ALERT,
1117 NFT_LOGLEVEL_CRIT,
1118 NFT_LOGLEVEL_ERR,
1119 NFT_LOGLEVEL_WARNING,
1120 NFT_LOGLEVEL_NOTICE,
1121 NFT_LOGLEVEL_INFO,
1122 NFT_LOGLEVEL_DEBUG,
1123 NFT_LOGLEVEL_AUDIT,
1124 __NFT_LOGLEVEL_MAX
1125};
1126#define NFT_LOGLEVEL_MAX (__NFT_LOGLEVEL_MAX + 1)
1105 1127
1106/** 1128/**
1107 * enum nft_queue_attributes - nf_tables queue expression netlink attributes 1129 * enum nft_queue_attributes - nf_tables queue expression netlink attributes