Thank you Tom.  I agree this is not a universal solution, indeed "temporary
workaround" is a better description.  I will continue studying how it works
and report back if I figure out why the hints don't work in Cygwin.

I wonder how many people are compiling Xastir on Cygwin anymore...

-----Original Message-----
From: Xastir <xastir-boun...@lists.xastir.org> On Behalf Of Tom Russo
Sent: October 30, 2021 1:06 PM
To: Xastir - APRS client software discussion <xas...@xastir.org>
Subject: Re: [Xastir] Networking issue for Cygwin (and possible solution)


The call to getaddrinfo in forked_getaddrinfo should not be universally
zeriong
the hints.  In fact, for most systems the hints are deliberately set in 
interface.c's "net_init" function and passed down into forked_getaddrinfo.

Zeroing them after that is just wrong in all the cases that already work.

There must be something special about Cygwin that makes the specific hints
chosen not work there:

  hints.ai_family = AF_UNSPEC;
  hints.ai_socktype = SOCK_STREAM;
  hints.ai_protocol = 0;
  hints.ai_flags = AI_NUMERICSERV|AI_ADDRCONFIG;


If you can figure out what is wrong with this specific set of hints that
lets it work everywhere *except* cygwin then perhaps it can be dealt with
somehow.  But these hints have been working for quite some time with all 
other systems, so it would be wrong simply to zero them unconditionally.

The specific hints added here were done in commit bbab5f92 in 2018 in order
to add IPv6 support, so that explains why it stopped working on Cygwin
relatively recently.

Perhaps Jason (who wrote that code) can investigate the right fix.



_______________________________________________
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir

Reply via email to