diff options
| author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2026-05-19 23:11:43 +0200 |
|---|---|---|
| committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2026-05-19 23:33:48 +0200 |
| commit | c65a11c2dc645c3aa77d7e80ba78091e9fbffdfc (patch) | |
| tree | 9246804c24bcd766b3c7737eb1e880b84b045485 /python | |
| parent | a263b2b62e72b208fd330f9055aefca29640ff2b (diff) | |
| download | vyos-1x-c65a11c2dc645c3aa77d7e80ba78091e9fbffdfc.tar.gz vyos-1x-c65a11c2dc645c3aa77d7e80ba78091e9fbffdfc.zip | |
geoip: T8590: skip recursive dict search in imported config dicts
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/geoip.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/vyos/geoip.py b/python/vyos/geoip.py index 619af0785..db2313ab9 100644 --- a/python/vyos/geoip.py +++ b/python/vyos/geoip.py @@ -217,6 +217,9 @@ def geoip_update(firewall=None, policy=None): if firewall: for codes, path in dict_search_recursive(firewall, 'country_code'): + if path[0] == 'policy': + continue + version = 6 if path[0] == 'ipv6' else 4 vprefix = '6' if version == 6 else '' set_name = f'GEOIP_CC{vprefix}_{path[1]}_{path[2]}_{path[4]}' @@ -224,6 +227,9 @@ def geoip_update(firewall=None, policy=None): if policy: for codes, path in dict_search_recursive(policy, 'country_code'): + if path[0] == 'firewall': + continue + version = 6 if path[0] == 'route6' else 4 vprefix = '6' if version == 6 else '' set_name = f'GEOIP_CC{vprefix}_{path[0]}_{path[1]}_{path[3]}' |
