diff --git a/update-firewall-source.py b/update-firewall-source.py index 2d57167..6e984c9 100644 --- a/update-firewall-source.py +++ b/update-firewall-source.py @@ -545,8 +545,14 @@ if __name__ == '__main__': log.debug(f"Iterating over config sections ...") for section in config.sections(): - log.debug(f"Processing section '[{section}]' ...") - log.debug(config.getlist(section, "addr")) + log.info(f"Generating rules from section '[{section}]' ...") + arg_fwd_addr = config.getlist(section, "addr") + arg_allow_sources = {"ipv4": [], "ipv6": []} + if arg_fwd_addr: + arg_allow_sources = resolve_addresses(config, section, arg_fwd_addr) + log.debug(arg_allow_sources) + else: + log.info(f"No source address given. Rules will apply to all sources.") # arg_allow_sources = resolve_addresses(arg_allow_list) # gen_fw_rule_xml(arg_allow_sources)