[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] [patch] errors on 3.2 under FreeBSD



Hi,
Thanks for looking into my patch.

On Sat, Apr 6, 2013 at 11:26 PM, Wouter Verhelst <w@...112...> wrote:
I'm afraid there are some portability issues with nbd-server as it is
currently. Your patch hides some of them (by making the test suite
succeed in the face of an obvious bug -- that the server isn't listening
on both IPv4 and IPv6 when we ask it to), and breaks nbd-server for
Linux in others (I hereby decide that I hate getopt).

I can't accept a patch with that result. I'm sure you understand :-)

I know that changing test code is the last resort.
Since I haven't understood your intention correctly, the patch should be rejected.
 

The first issue is a case of misunderstanding how things are *supposed*
to work. Opening one "modern" socket for both IPv4 and IPv6 just happens
to work on Linux, but that isn't required. If we want to be portable, we
need to manage *all* results from getaddrinfo(), not just the first.
I'll look into that today (or maybe tomorrow).

What happend in my environment was:
nbd-server listens on IPv6 only when it started with ``modern'' configuration.
gethostbyname("localhost") returned AF_INET one and the tests failed.

 
Since GNU getopt is available in a separate
library, I'll just change the configure script to have it require GNU
getopt instead. That's the chickening out way, but it has the advantage
of not requiring too much code changes.

That's sounds good.


Regards,
-- 

Hirohisa Yamaguchi

Reply to: