summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-11-17 17:37:27 +0100
committerPhil Sutter <phil@nwl.cc>2022-11-24 10:24:06 +0100
commit06f0d6fdb73be00570604b33c00b1f7bf1dacaa5 (patch)
tree37511fa83ca875bcf766bf37a4e4194ae0dbb24d /extensions
parent0b946dabf34a068adf3e35924578ffb06a249bb8 (diff)
extensions: libebt_log: Add comment to clarify xlate callback
Several log flags are ignored by the function. Add a comment explaining why this is correct. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/libebt_log.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/extensions/libebt_log.c b/extensions/libebt_log.c
index 47708d79..13c7fafe 100644
--- a/extensions/libebt_log.c
+++ b/extensions/libebt_log.c
@@ -191,6 +191,8 @@ static int brlog_xlate(struct xt_xlate *xl,
if (loginfo->loglevel != LOG_DEFAULT_LEVEL)
xt_xlate_add(xl, " level %s", eight_priority[loginfo->loglevel].c_name);
+ /* ebt_log always decodes MAC header, nft_log always decodes upper header -
+ * so set flags ether and ignore EBT_LOG_IP, EBT_LOG_ARP and EBT_LOG_IP6 */
xt_xlate_add(xl, " flags ether ");
return 1;