]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libebt_log: Add comment to clarify xlate callback
authorPhil Sutter <phil@nwl.cc>
Thu, 17 Nov 2022 16:37:27 +0000 (17:37 +0100)
committerPhil Sutter <phil@nwl.cc>
Thu, 24 Nov 2022 09:24:06 +0000 (10:24 +0100)
Several log flags are ignored by the function. Add a comment explaining
why this is correct.

Signed-off-by: Phil Sutter <phil@nwl.cc>
extensions/libebt_log.c

index 47708d79310e0013f5f1ab663569fb9527d6d119..13c7fafecb11e0ac367f223e0ae6ac2f55031d64 100644 (file)
@@ -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;