[haiku-bugs] Re: [Haiku] #12399: Static network address configuration fails

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Sun, 26 Feb 2017 08:12:47 -0000

#12399: Static network address configuration fails
--------------------------------+----------------------------
   Reporter:  kallisti5         |      Owner:  axeld
       Type:  bug               |     Status:  new
   Priority:  high              |  Milestone:  R1/beta1
  Component:  Kits/Network Kit  |    Version:  R1/Development
 Resolution:                    |   Keywords:
 Blocked By:                    |   Blocking:
Has a Patch:  0                 |   Platform:  All
--------------------------------+----------------------------

Comment (by pulkomandy):

 getaddrinfo on a static IP should work without needing to query anything
 on the network. For this to work, the AI_NUMERICHOST flag should be set
 and the IP address should be in numeric form (no DNS query needed in that
 case).

 In the case of BNetworkAddressResolver, this maps to the
 B_NO_ADDRESS_RESOLUTION flag.

 This flags seems to be missing in {{{InterfaceAddressView.cpp:347:
 address.SetTo(string.String());}}}. It is set properly in
 {{{IPAddressControl.cpp:81:        bool success = address.SetTo(fFamily,
 Text(), (char*)NULL,
 }}}. I don't see other calls to BNetworkAddress::SetTo from a quick glance
 at the network preferences.

 Just adding the flag in InterfaceAddressView would fix the problem, then.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12399#comment:5>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: