[Xastir] Networking issue for Cygwin (and possible solution)

easternontariotracks at gmail.com easternontariotracks at gmail.com
Sat Oct 30 10:27:06 PDT 2021


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-bounces at lists.xastir.org> On Behalf Of Tom Russo
Sent: October 30, 2021 1:06 PM
To: Xastir - APRS client software discussion <xastir at 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.





More information about the Xastir mailing list