]> git.ipfire.org Git - thirdparty/linux.git/commit
netfilter: xt_HL: add pr_fmt and checkentry validation
authorMarino Dzalto <marino.dzalto@gmail.com>
Fri, 3 Apr 2026 20:59:07 +0000 (22:59 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 10 Apr 2026 10:16:26 +0000 (12:16 +0200)
commit24bd5c2679caf8a228d90cafa221da4b47fd6642
treec400ecbcaa05c83fd28bf795d16838aacae29445
parent74feb7d373b32a63d7986a2caf9689c860c9a761
netfilter: xt_HL: add pr_fmt and checkentry validation

Add pr_fmt to prefix log messages with the module name for
easier debugging in dmesg.

Add checkentry functions for IPv4 (ttl_mt_check) and IPv6
(hl_mt6_check) to validate the match mode at rule registration
time, rejecting invalid modes with -EINVAL.

The evaluation function returns false in case the mode is
unknown, so this is a cleanup, not a bug fix.

Signed-off-by: Marino Dzalto <marino.dzalto@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/xt_hl.c