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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -1099,9 +1099,31 @@ enum nft_log_attributes { · 1098 unmodified lines | |||
| 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 | */ | ||
| 1114 | enum 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 |