[haiku-bugs] Re: [Haiku] #8293: BNetworkAddress needs to check if there is an available IPv6 connection.

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Mon, 02 Jan 2017 09:43:59 -0000

#8293: BNetworkAddress needs to check if there is an available IPv6 connection.
-------------------------------------+-------------------------------------
   Reporter:  kallisti5              |      Owner:  axeld
       Type:  bug                    |     Status:  reopened
   Priority:  high                   |  Milestone:  R1/beta1
  Component:  Network &              |    Version:  R1/Development
  Internet/Stack                     |   Keywords:
 Resolution:                         |   Blocking:  9269, 10033, 12173,
 Blocked By:                         |  12174, 12186, 12188, 12233
Has a Patch:  1                      |   Platform:  All
-------------------------------------+-------------------------------------

Comment (by pulkomandy):

 I remembered the missing bit: you need to set the AI_ADDRCONFIG flag for
 the filtering to be enabled. Otherwise, you get the full reply from the
 DNS server, witohut filtering. As specified in POSIX:
 http://pubs.opengroup.org/onlinepubs/9699919799/functions/freeaddrinfo.html

 We do so in BNetworkAddressResolver: http://cgit.haiku-
 os.org/haiku/tree/src/kits/network/libnetapi/NetworkAddressResolver.cpp#n163

 All users of getaddrinfo need to be updated to use the flag when it makes
 sense, however. That is almost always, unless:
 - They don't plan to actually connect to the address (nslookup type of
 application)
 - They don't plan to us IPv4 or v6 addresses (looking for an MX record,
 for example)
 - They handle IPv6/v4 switch in their own way

--
Ticket URL: <https://dev.haiku-os.org/ticket/8293#comment:37>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: