HomeFreeBSD

Issue #237 : Resolver uses nameserver commented out in /etc/resolv.conf

Description

Issue #237 : Resolver uses nameserver commented out in /etc/resolv.conf

This /etc/resolv.conf:

  1. x
  2. nameserver 8.8.8.8

Still configured 8.8.8.8 as nameserver, because the comment detection in ldns_resolver_new_frm_fp_l() didn't anticipate empty lines before the comment.
This fix removed all comment handling from ldns_resolver_new_frm_fp_l(). Instead a new function is introduced ldns_fget_token_l_resolv_conf() that skips comments that start with '#' and ';'. The old ldns_fget_token_l() (that is used for zonefiles too) still accepts only ';' for comments.

Details

Provenance
Willem Toorop <willem@nlnetlabs.nl>Authored on May 7 2024, 12:43 PM
desCommitted on May 15 2024, 9:46 AM
Parents
rGcf3e3d5bd0a1: import ldns 1.8.3
Branches
Unknown
Tags
Unknown