OpenSolaris

Printable Version Enter a New Search
Bug ID 6745640
Synopsis The IP netinfo provider should set the family of sockaddr's it returns
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:netinfo
Keywords
Responsible Engineer Darren Reed
Reported Against snv_99
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_102
Fixed In snv_102
Release Fixed solaris_nevada(snv_102) , solaris_10u7(s10u7_04) (Bug ID:2168220)
Related Bugs 6418698
Submit Date 8-September-2008
Last Update Date 6-November-2008
Description
The IP netinfo provider, in functions like ip_getlifaddr(), returns addresses in arrays of sockaddrs'.  It sets the sin_addr or sin6_addr portions of the sockaddrs', but leaves the family field uninitialized.

It would be more convenient for consumers if it set the sa_family field to match the address being returned, and the sockaddrs could then be transparently used without modification to pass to other functions.
At present the value of _family is implied by the situation the call is made in (it must be made for only one specific address family) which requires, as the description says, it to be set before the structure can be used.
[ deleted unrelated information ]
For the structure returned by this function call to have full meaning by itself,
it is necessary to set the _family field.
Work Around
N/A
Comments
N/A