The code can handle having no interfaces, because interfaces can be configured 
in the future. The problem is that if this function returns an error (ie there 
were no configured interfaces during startup) the daemon will exit, and this is 
not desirable. Restructuring the code too much will result in merge pain in the 
future... We should find who maintains that code and contribute all the bug 
fixes...

christos

> On Nov 19, 2018, at 12:42 PM, Robert Elz <k...@munnari.oz.au> wrote:
> 
>    Date:        Mon, 19 Nov 2018 03:14:28 -0500
>    From:        "Christos Zoulas" <chris...@netbsd.org>
>    Message-ID:  <20181119081428.def1cf...@cvs.netbsd.org>
> 
>  | Modified Files:
>  |    src/external/apache2/mDNSResponder/dist/mDNSPosix: mDNSPosix.c
> 
> 
>  | It is not an error if we did not find any IPv4 interfaces. It could
>  | be the case we never have V4 interfaces (in a V6 system) so this
>  | is bogus.
> 
> Rather than just removing the test, a better fix would be to move it
> to after the v6 interfaces are added?    That way it really would be
> testing if there are no interfaces at all (in which case this code is
> not going to accomplish much).
> 
> Otherwise, the "err" variable should just be removed, and the function
> made to return 0 as "err" is init'd to 0, tested a couple of times, and then
> returned (but never updated) as the code stands now.
> 
> kre

Reply via email to