diff options
| author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2026-06-17 10:31:08 +0200 |
|---|---|---|
| committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2026-06-17 10:31:08 +0200 |
| commit | 0802000d23b9b3b9d91953ba3e71a290a197a0b0 (patch) | |
| tree | 0508e038937c157da6e8b7067b1586109d0a34ce /src/services | |
| parent | 88dfc8cd43521ae489900fb9746c56545140df54 (diff) | |
| download | vyos-1x-0802000d23b9b3b9d91953ba3e71a290a197a0b0.tar.gz vyos-1x-0802000d23b9b3b9d91953ba3e71a290a197a0b0.zip | |
firewall: T8991: Fix IndexError with domain resolver mishandling blank lines
Diffstat (limited to 'src/services')
| -rwxr-xr-x | src/services/vyos-domain-resolver | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/services/vyos-domain-resolver b/src/services/vyos-domain-resolver index e1a52c93a..65b2a476b 100755 --- a/src/services/vyos-domain-resolver +++ b/src/services/vyos-domain-resolver @@ -166,13 +166,15 @@ def update_remote_group(config): for line in read_file(list_file).splitlines(): line_first_word = line.strip().partition(' ')[0] + if not line_first_word: + continue + if is_valid_ipv4_address_or_range(line_first_word): ip_list.append(line_first_word) elif is_valid_ipv6_address_or_range(line_first_word): ip6_list.append(line_first_word) - else: - if line_first_word[0].isalnum(): - invalid_list.append(line_first_word) + elif line_first_word[0].isalnum(): + invalid_list.append(line_first_word) # Load ip tables for table in ipv4_tables: |
