summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2004-01-26 19:15:50 +0000
committerhenning <henning@openbsd.org>2004-01-26 19:15:50 +0000
commit52c7f446249eed70887e5a6e56db0014d2305b1f (patch)
tree435003c26181f24e91e51bd86e4f4083613725f2
parentprint cis information on configured cards as pcmcia(4) does; mentioned by (diff)
downloadwireguard-openbsd-52c7f446249eed70887e5a6e56db0014d2305b1f.tar.xz
wireguard-openbsd-52c7f446249eed70887e5a6e56db0014d2305b1f.zip
-we don't use SIOCGIFCONF any more, we use getifaddrs(). update comment.
-we don't need the socket any more either; remove. ok deraadt@
-rw-r--r--sbin/dhclient/dispatch.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c
index d978223bc1b..c92f1591c44 100644
--- a/sbin/dhclient/dispatch.c
+++ b/sbin/dhclient/dispatch.c
@@ -63,7 +63,7 @@ static int interface_status(struct interface_info *ifinfo);
int quiet_interface_discovery;
-/* Use the SIOCGIFCONF ioctl to get a list of all the attached interfaces.
+/* Use getifaddrs() to get a list of all the attached interfaces.
For each interface that's of type INET and not the loopback interface,
register that interface with the network I/O software, figure out what
subnet it's on, and add it to the list of interfaces. */
@@ -73,7 +73,6 @@ void discover_interfaces (state)
{
struct interface_info *tmp;
struct interface_info *last, *next;
- int sock;
struct subnet *subnet;
struct shared_network *share;
struct sockaddr_in foo;
@@ -84,10 +83,6 @@ void discover_interfaces (state)
char *s;
#endif
- /* Create an unbound datagram socket to do the SIOCGIFADDR ioctl on. */
- if ((sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
- error ("Can't create addrlist socket");
-
if (getifaddrs(&ifap) != 0)
error ("getifaddrs failed");
@@ -284,7 +279,6 @@ void discover_interfaces (state)
add_protocol (tmp -> name, tmp -> rfdesc, got_one, tmp);
}
- close (sock);
freeifaddrs(ifap);
maybe_setup_fallback ();