[haiku-bugs] Re: [Haiku] #3884: short-form IP adress format broken

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Sat, 25 Mar 2017 11:10:23 -0000

#3884: short-form IP adress format broken
----------------------------------+---------------------------
   Reporter:  marcusoverhagen     |      Owner:  axeld
       Type:  bug                 |     Status:  new
   Priority:  normal              |  Milestone:  R1
  Component:  Network & Internet  |    Version:  R1/pre-alpha1
 Resolution:                      |   Keywords:
 Blocked By:                      |   Blocking:
Has a Patch:  1                   |   Platform:  All
----------------------------------+---------------------------

Comment (by pulkomandy):

 Actually, this is not the right solution. POSIX explicitly disallow doing
 this:
 http://pubs.opengroup.org/onlinepubs/9699919799/functions/inet_ntop.html

 inet_pton must accept only addresses in the ddd.ddd.ddd.ddd format.

If the af argument of inet_pton() is AF_INET, the src string shall be in
 the standard IPv4 dotted-decimal form:

ddd.ddd.ddd.ddd

where "ddd" is a one to three digit decimal number between 0 and 255
 (see inet_addr). The inet_pton() function does not accept other formats
 (such as the octal numbers, hexadecimal numbers, and fewer than four
 numbers that inet_addr() accepts).

 So, it would seem everything is as expected: this address format is no
 longer supported in the default case.

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

Other related posts: