Follow-up Comment #5, bug #16509 (project freeciv):

I found an Ubuntu getnameinfo(3) at

Further down, it says:

              If  set,  then  the  numeric  form  of the hostname is
              (When not set, this will still happen in case  the  node's 
              cannot be determined.)

If the manual page is correct, then Ubuntu getnameinfo() returns the
numerical address if there is no name. So NI_NAMEREQD would not fix this bug,
because getnameinfo() provides a numerical address, not an empty string.

There is no harm to add NI_NAMEREQD to the code, whether or not it fixes this

> Do you have an other idea how a connection can get an empty hostname?

* A pointer bug, that drops the name in the wrong buffer?
* A buffer size that is too small? (But this would probably cause a truncated
name instead of an empty name.)
* A bad DNS server that provides "" as name for some address?


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to