Skip to content

Commit

Permalink
fix(mwan): adding CIDR/IPlists to MWAN objects (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaile authored Aug 5, 2024
1 parent 3dfc303 commit 735a48e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nethsec/mwan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _is_valid_src(e_uci: EUci, database_id: str):
True if object is valid, False otherwise
"""
if objects.is_host_set(e_uci, database_id):
return objects.is_singleton_host_set(e_uci, database_id)
return objects.is_singleton_host_set(e_uci, database_id, allow_cidr=True)

return objects.is_host(e_uci, database_id) or objects.is_domain(e_uci, database_id) or objects.is_vpn_user(e_uci, database_id)

Expand All @@ -58,7 +58,7 @@ def _is_valid_dst(e_uci: EUci, database_id: str):
True if object is valid, False otherwise
"""
if objects.is_host_set(e_uci, database_id):
return objects.is_singleton_host_set(e_uci, database_id)
return objects.is_singleton_host_set(e_uci, database_id, allow_cidr=True)

return objects.is_domain_set(e_uci, database_id) or objects.is_host(e_uci, database_id) or objects.is_domain(e_uci, database_id) or objects.is_vpn_user(e_uci, database_id)

Expand Down

0 comments on commit 735a48e

Please sign in to comment.