diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-06-10 19:53:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 19:53:31 +0200 |
commit | 007953d36388f904e31b04ffdb854e8e5602cc0d (patch) | |
tree | dd13d7fdfbb7d75524e44bcc26e5317f2f95031a /src/conf_mode | |
parent | fcad9572e880ab5dd71636e0aa4842dc8997bc44 (diff) | |
parent | 76684692f8976aa567cf896586b4e6d3b00385f9 (diff) | |
download | vyos-1x-007953d36388f904e31b04ffdb854e8e5602cc0d.tar.gz vyos-1x-007953d36388f904e31b04ffdb854e8e5602cc0d.zip |
Merge pull request #1354 from sever-sever/T970
firewall: T970: Fix for Regex for domain and check empty group
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/firewall.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/firewall.py b/src/conf_mode/firewall.py index 335098bf1..fbe0a3a13 100755 --- a/src/conf_mode/firewall.py +++ b/src/conf_mode/firewall.py @@ -423,8 +423,9 @@ def apply(firewall): call('systemctl restart vyos-domain-group-resolve.service') for group, group_config in firewall['group']['domain_group'].items(): domains = [] - for address in group_config['address']: - domains.append(address) + if group_config.get('address') is not None: + for address in group_config.get('address'): + domains.append(address) # Add elements to domain-group, try to resolve domain => ip # and add elements to nft set ip_dict = get_ips_domains_dict(domains) |