zones: fix emitting match rules for zones with only "extra" options
authorJo-Philipp Wich <jo@mein.io>
Fri, 22 Nov 2019 17:23:16 +0000 (18:23 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 22 Nov 2019 17:51:50 +0000 (18:51 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
zones.c

diff --git a/zones.c b/zones.c
index 4f2b1e4bd88672d62250e972d78eebac151ab595..01fb706dd6dc5613dfebfd4859c3d71d557ab94b 100644 (file)
--- a/zones.c
+++ b/zones.c
@@ -594,7 +594,7 @@ print_interface_rules(struct fw3_ipt_handle *handle, struct fw3_state *state,
                if (!fw3_is_family(sub, handle->family))
                        continue;
 
-               if (!dev && !sub)
+               if (!dev && !sub && !zone->extra_src && !zone->extra_dest)
                        continue;
 
                print_interface_rule(handle, state, reload, zone, dev, sub);