diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-06-17 14:48:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-17 14:48:57 +0100 |
| commit | c92535d5afcddd58875c5394f967f95cbcc94aef (patch) | |
| tree | 0f09f51f24f7efeca1ce05f4234c03ee8270dde3 /src | |
| parent | 1c5760b47b7d24215acaab10da5b30481c563810 (diff) | |
| parent | 0802000d23b9b3b9d91953ba3e71a290a197a0b0 (diff) | |
| download | vyos-1x-c92535d5afcddd58875c5394f967f95cbcc94aef.tar.gz vyos-1x-c92535d5afcddd58875c5394f967f95cbcc94aef.zip | |
Merge pull request #5278 from sarthurdev/T8991
firewall: T8991: Fix IndexError with domain resolver mishandling blank lines
Diffstat (limited to 'src')
| -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: |
