diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-07-02 22:03:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-07-02 22:03:28 +0000 |
commit | 46de5f34a313958c5ed1576a0fb24f4dbc1a52fe (patch) | |
tree | e9419fa7bb5171f2025767427e9523e222c9651d | |
parent | 970e04fc02f2adfd87099924b9ed8f94bd2a6a65 (diff) |
garbage collect an unused function; ok claudio
-rw-r--r-- | sbin/dhclient/dhcpd.h | 3 | ||||
-rw-r--r-- | sbin/dhclient/dispatch.c | 29 |
2 files changed, 2 insertions, 30 deletions
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index 53841d9ff0c..c7bb9eca06c 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.70 2010/06/02 09:57:16 phessler Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.71 2010/07/02 22:03:27 deraadt Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -261,7 +261,6 @@ void cancel_timeout(void (*)(void)); int interface_link_status(char *); int interface_status(char *); int interface_link_forceup(char *); -void interface_link_forcedown(char *); int get_rdomain(char *); /* tables.c */ diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index d1302f09fed..23d0e010386 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.46 2010/06/02 09:57:16 phessler Exp $ */ +/* $OpenBSD: dispatch.c,v 1.47 2010/07/02 22:03:27 deraadt Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -257,33 +257,6 @@ interface_link_forceup(char *ifname) return (1); } -void -interface_link_forcedown(char *ifname) -{ - struct ifreq ifr; - int sock; - - if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1) - error("Can't create socket"); - - memset(&ifr, 0, sizeof(ifr)); - strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); - if (ioctl(sock, SIOCGIFFLAGS, (caddr_t)&ifr) == -1) { - close(sock); - return; - } - - if ((ifr.ifr_flags & IFF_UP) == IFF_UP) { - ifr.ifr_flags &= ~IFF_UP; - if (ioctl(sock, SIOCSIFFLAGS, (caddr_t)&ifr) == -1) { - close(sock); - return; - } - } - - close(sock); -} - int interface_status(char *ifname) { |