summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich2022-02-05 23:30:41 +0000
committerJo-Philipp Wich2022-02-05 23:33:04 +0000
commit300c737e48fda62e38ee60ec9a38350eca55264f (patch)
tree3dc69284d08127dc03e1bba4cb2e095b8999f7ee
parenteb9c25aaae63b18cb22783c5ba3260b1aabbcb96 (diff)
downloadfirewall4-300c737e48fda62e38ee60ec9a38350eca55264f.tar.gz
fw4: fix applying zone family restrictions to forwardings
The source or destination zone family may be `null` instead of `0`, so loosen the condition to cover both `0` and `null` values. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--root/usr/share/ucode/fw4.uc4
1 files changed, 2 insertions, 2 deletions
diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc
index 175883f..fb87208 100644
--- a/root/usr/share/ucode/fw4.uc
+++ b/root/usr/share/ucode/fw4.uc
@@ -1993,9 +1993,9 @@ return {
let f1 = fwd.src.zone ? fwd.src.zone.family : 0;
let f2 = fwd.dest.zone ? fwd.dest.zone.family : 0;
- if (f1 != 0 && f2 != 0 && f1 != f2) {
+ if (f1 && f2 && f1 != f2) {
this.warn_section(data,
- sprintf("references src %s restricted to %s and dest restricted to %s, ignoring forwarding",
+ sprintf("references src %s restricted to %s and dest %s restricted to %s, ignoring forwarding",
fwd.src.zone.name, this.nfproto(f1, true),
fwd.dest.zone.name, this.nfproto(f2, true)));