Austin Group Defect Tracker

Aardvark Mark IV

Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001573 [1003.1(2016/18)/Issue7+TC2] System Interfaces Editorial Clarification Requested 2022-03-19 00:18 2024-06-11 09:07
Reporter steffen View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Closed  
Name steffen
User Reference
Section inet_pton
Page Number 1139
Line Number 38475 ff.
Interp Status ---
Final Accepted Text Note: 0005814
Summary 0001573: inet_pton: clarify IPv4 "standard IPv4 dotted-decimal form"
Description POSIX says

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


  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).

Whereas it explicitly states "octal" here, text forms exist
which always use "ddd.ddd.ddd.ddd", zero padded: the source
of the strings may be end-users used to such forms.

The standard does allow "Leading zeros in individual fields
can be omitted" for IPv6, resulting in two different grades
of fault tolerance for the different IP address types.
(Not to mention that RFCs exist which update IPv6 notation
to be absolutely non-forgiving regarding compression, leading
zeroes, and even character case! (But it seems not all parts
of IETF actually do follow it, as the older, much more
forgiving initial IPv6 RFC allows all sorts of textual
representation, and i for one had a converter which flag-driven
almost supports them all (personally in favour of uppercase).))

As it stands a tolerant software is better off polishing
user data before calling inet_pton. It would be nice if the
standard would not only require decimal, but allow leading
zeroes in IPv4 address fields.
Desired Action On line 38479, remove "the octal numbers, ".
On line 38480, insert before the closing parenthesis
"Leading zeroes shall be allowed".
Tags tc3-2008
Attached Files

- Relationships

-  Notes
geoffclare (manager)
2022-04-21 16:20

On line 38478-38480, change:
The inet_pton() function does not accept other formats (such as the octal numbers, hexadecimal numbers, ...
Leading zeroes shall be allowed. The inet_pton() function does not accept other formats (such as octal numbers, hexadecimal numbers, ...

- Issue History
Date Modified Username Field Change
2022-03-19 00:18 steffen New Issue
2022-03-19 00:18 steffen Name => steffen
2022-03-19 00:18 steffen Section => inet_pton
2022-03-19 00:18 steffen Page Number => 1139
2022-03-19 00:18 steffen Line Number => 38475 ff.
2022-04-21 16:20 geoffclare Note Added: 0005814
2022-04-21 16:21 geoffclare Interp Status => ---
2022-04-21 16:21 geoffclare Final Accepted Text => Note: 0005814
2022-04-21 16:21 geoffclare Status New => Resolved
2022-04-21 16:21 geoffclare Resolution Open => Accepted As Marked
2022-04-21 16:22 geoffclare Tag Attached: tc3-2008
2022-05-23 11:37 geoffclare Status Resolved => Applied
2024-06-11 09:07 agadmin Status Applied => Closed

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker