CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2020/01/20 11:41:49
Modified files:
usr.sbin/bind/bin/dig: dighost.c
usr.sbin/bind/lib/lwres: lwconfig.c
usr.sbin/bind/lib/lwres/include/lwres: lwres.h
Log message:
Fix a address family desynchronisation between lwres_conf and
dig_serverlist.
In one of the first shredding commits lwres unintentionally lost the
ability to track if the user requested IPv4 only or IPv6 only
operations. Parsing of /etc/resolv.conf would add all nameservers,
ignoring their address family.
When dig(1) later populated server_list it would pay attention to
the address family.
If /etc/resolv.conf contains only IPv4 nameservers and it has 3 or
more and the user requests IPv6 only operations dig would fail with
"add_nameserver failed". This happens because lwres_conf already
contains 3 nameservers but server_list is empty so dig tries to add
::1 to lwres_conf.
It feels like this is very convoluted but it restores previous
behavoir the way it was implemented before. Thus sidestepping some
refactoring.
OK millert