Skip to content

Commit

Permalink
objects: domain set, fix ipset usage
Browse files Browse the repository at this point in the history
Firewall rules must refer the ipset by name and not by id.
  • Loading branch information
gsanchietti committed Jun 26, 2024
1 parent a72b6c3 commit 4f4f12e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nethsec/objects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def get_domain_set_ipsets(uci, id):
ipsets = {"firewall": None, "dhcp": None}
for section in utils.get_all_by_type(uci, "firewall", "ipset"):
if uci.get('firewall', section, 'ns_link', default=None) == f'objects/{id}':
ipsets["firewall"] = section
ipsets["firewall"] = uci.get("firewall", section, "name", default='')
break
for section in utils.get_all_by_type(uci, "dhcp", "ipset"):
if uci.get('dhcp', section, 'ns_link', default=None) == f'objects/{id}':
Expand Down

0 comments on commit 4f4f12e

Please sign in to comment.