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
0000979 [1003.1(2013)/Issue7+TC1] System Interfaces Editorial Clarification Requested 2015-08-24 07:14 2019-06-10 08:54
Reporter EdSchouten View Status public  
Assigned To ajosey
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Ed Schouten
Organization Nuxi
User Reference
Section getaddrinfo()
Page Number 925
Line Number 31185
Interp Status ---
Final Accepted Text See Note: 0002845.
Summary 0000979: AI_V4MAPPED: "ai_addrlen shall be 16", should it really?
Description If I understand the description of getaddrinfo() correctly, ai_addrlen corresponds with the size of the socket address structure returned. This allows you to call connect(), bind(), etc., using [ai_addr, ai_addrlen]. There is a sentence in the article that does contradict this:

"If the AI_V4MAPPED flag is specified along with an ai_family of AF_INET6, then getaddrinfo() shall return IPv4-mapped IPv6 addresses on finding no matching IPv6 addresses (ai_addrlen shall be 16)"

My objection is with the "ai_addrlen shall be 16". The intent would be that ai_addrlen is set to sizeof(struct sockaddr_in6) -- not 16 specifically. Having a struct sockaddr_in6 that is only 16 bytes in size would be impossible.
Desired Action This part of the sentence should either be removed or replaced to state that ai_addrlen shall be sizeof(struct sockaddr_in6).
Tags tc2-2008
Attached Files

- Relationships

-  Notes
(0002796)
shware_systems (reporter)
2015-08-25 07:31

I concur; it appears that the intent of the 16 was to indicate all 16 bytes of the mapped sin6_addr are significant, and that only storing the 4 bytes of the V4 address in that location, as a way to save 12 bytes of allocation, was not to be done by conforming implementations. If the intent was the 16 be an arbitrary value indicating the address was a mapped form and not a regular IP6 address that was reported I'd think that would have been mentioned in the Application Usage section.
(0002845)
Don Cragun (manager)
2015-09-24 16:06
edited on: 2015-09-24 16:07

Change:
If the AI_V4MAPPED flag is specified along with an ai_family of AF_INET6
then getaddrinfo() shall return IPv4-mapped IPv6 addresses on finding no
matching IPv6 addresses (ai_addrlen shall be 16). The AI_V4MAPPED flag
shall be ignored unless ai_family equals AF_INET6. If the AI_ALL flag is
used with the AI_V4MAPPED flag, then getaddrinfo() shall return all
matching IPv6 and IPv4 addresses. The AI_ALL flag without the
AI_V4MAPPED flag is ignored.

on P925, L31183-31187 to (keeping the IP6 shading):
By default, with an ai_family of AF_INET6, getaddrinfo() shall
return only IPv6 addresses. If the AI_V4MAPPED flag is specified along with
an ai_family of AF_INET6, then getaddrinfo() shall return
IPv4-mapped IPv6 addresses on finding no matching IPv6 addresses. The
AI_V4MAPPED flag shall be ignored unless ai_family equals
AF_INET6. If the AI_ALL flag is used with the AI_V4MAPPED flag, then
getaddrinfo() shall return all matching IPv6 and IPv4 addresses. The
AI_ALL flag without the AI_V4MAPPED flag shall be ignored.



- Issue History
Date Modified Username Field Change
2015-08-24 07:14 EdSchouten New Issue
2015-08-24 07:14 EdSchouten Status New => Under Review
2015-08-24 07:14 EdSchouten Assigned To => ajosey
2015-08-24 07:14 EdSchouten Name => Ed Schouten
2015-08-24 07:14 EdSchouten Organization => Nuxi
2015-08-24 07:14 EdSchouten Section => getaddrinfo()
2015-08-24 07:14 EdSchouten Page Number => (page or range of pages)
2015-08-24 07:14 EdSchouten Line Number => (Line or range of lines)
2015-08-25 07:31 shware_systems Note Added: 0002796
2015-09-24 15:18 nick Page Number (page or range of pages) => 925
2015-09-24 15:18 nick Line Number (Line or range of lines) => 31185
2015-09-24 15:18 nick Interp Status => ---
2015-09-24 16:06 Don Cragun Note Added: 0002845
2015-09-24 16:07 Don Cragun Note Edited: 0002845
2015-09-24 16:08 Don Cragun Final Accepted Text => See Note: 0002845.
2015-09-24 16:08 Don Cragun Status Under Review => Resolved
2015-09-24 16:08 Don Cragun Resolution Open => Accepted As Marked
2015-09-24 16:09 Don Cragun Tag Attached: tc2-2008
2015-10-05 14:28 geoffclare Category Base Definitions and Headers => System Interfaces
2015-10-05 14:28 geoffclare Project 1003.1(2008)/Issue 7 => 1003.1(2013)/Issue7+TC1
2019-06-10 08:54 agadmin Status Resolved => Closed


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