diff options
| author | Jo-Philipp Wich | 2023-08-04 22:46:47 +0000 |
|---|---|---|
| committer | Jo-Philipp Wich | 2023-08-04 22:46:47 +0000 |
| commit | 840ccdeeabce16e9f1f53390d870992ad372b967 (patch) | |
| tree | 247b34ab45dc36087e49a2dcba667c60177ea3ca | |
| parent | 23a434d0d15d61db61bb065c89f266a326c78a88 (diff) | |
| download | firewall4-840ccdeeabce16e9f1f53390d870992ad372b967.tar.gz | |
fw4: avoid emitting invalid rule jump targets
Avoid emitting a bogus chain jump for actionless rules bound to a
log-enabled source zone.
Fixes: https://github.com/openwrt/firewall4/issues/5
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
| -rw-r--r-- | root/usr/share/ucode/fw4.uc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc index 06ef932..cba7b02 100644 --- a/root/usr/share/ucode/fw4.uc +++ b/root/usr/share/ucode/fw4.uc @@ -2380,7 +2380,7 @@ return { } } - let need_src_action_chain = (rule) => (rule.src?.zone?.log && rule.target != "accept"); + let need_src_action_chain = (rule) => (rule.src?.zone?.log && rule.target && rule.target != "accept"); let add_rule = (family, proto, saddrs, daddrs, sports, dports, icmptypes, icmpcodes, ipset, rule) => { let r = { |