]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Have SIOCGIFCONF return all (if any) AF_INET addresses for the
authormarcel <marcel@FreeBSD.org>
Tue, 29 Jan 2002 06:00:11 +0000 (06:00 +0000)
committermarcel <marcel@FreeBSD.org>
Tue, 29 Jan 2002 06:00:11 +0000 (06:00 +0000)
commit5a61ac7f11300abf6cc2bcb39c2a0aa5964177ed
treed796ca170c5bf7d635c8f426413adcf51bb11d21
parent358efcfdcf2fdf9bb0177364a132eaf0e094ebac
Have SIOCGIFCONF return all (if any) AF_INET addresses for the
interfaces we encounter. In Linux, all addresses are returned for
which gifconf handlers are installed. This boils down to AF_DECnet
and AF_INET. We care mostly about AF_INET for now. Adding additional
families is simple enough.

Returning the addresses is important for RPC clients to function
properly. Andrew found in some reference code that the logic that
handles the retransmission looks for an interface that's up and has
an AF_INET address. This obviously failed as we didn't return any
addresses at all.

Note also that with this change we don't return interfaces that don't
have AF_INET addresses, whereas before we returned any interface
present in the system. This is in line with what Linux does (modulo
interfaces with only AF_DECnet addresses of course :-)

Reported by: "Andrew Atrens" <atrens@nortelnetworks.com>
MFC after: 1 week
sys/compat/linux/linux_ioctl.c