Bug 6589 - getifaddrs returns entries with invalid ifa_name
Summary: getifaddrs returns entries with invalid ifa_name
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-04 08:53 UTC by Vinay Sridhar
Modified: 2014-07-03 11:28 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
Patch to add support for infiniband device addresses (277 bytes, patch)
2008-06-04 08:55 UTC, Vinay Sridhar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vinay Sridhar 2008-06-04 08:53:50 UTC
On a system with ipv6 interfaces of Infiniband devices, getifaddrs returns
interface names for the ib entries as junk. The reason for this is that the
sockaddr_ll structure fails to accommodate 20 byte IB device addresses. By
extending the sll_addr field (currently 8 bytes) to 24 bytes, the issue is solved.
Comment 1 Vinay Sridhar 2008-06-04 08:55:56 UTC
Created attachment 2773 [details]
Patch to add support for infiniband device addresses
Comment 2 Ulrich Drepper 2008-06-13 06:18:03 UTC
This does not work.

First, the kernel defines the structure exactly as we do.

Second, changing this structure changes the ABI.

How does the kernel deal with this?
Comment 3 Vinay Sridhar 2008-06-19 07:54:23 UTC
Ulrich, 

I came across this thread that describes how the kernel handles 
device addresses > 8 bytes ::
http://lists.openfabrics.org/pipermail/general/2005-September/010986.html

Thanks,
Vinay
Comment 4 Vinay Sridhar 2008-07-22 11:18:04 UTC
Ulrich,

Any update with regard to the proposed fix? 

Thanks,
Vinay
Comment 5 Ulrich Drepper 2008-08-13 06:58:48 UTC
I have no way to test it but I hope it's fixed in cvs.  Reopen if necessary with
detailed description of the problem.
Comment 6 Vinay Sridhar 2008-08-14 08:52:53 UTC
(In reply to comment #5)
> I have no way to test it but I hope it's fixed in cvs.  Reopen if necessary with
> detailed description of the problem.

Tested with cvs. Yes, its fixed.

Thanks,
Vinay