summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-02-18 22:48:04 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-02-18 22:48:04 +0000
commit2dd018bd098b1e2e8d3ead3bce267c70565b9ae7 (patch)
treed378eb92e069b3581495ed1a71b898d396abdeb2 /sys/dev
parent16ed7bae2560328c8abd15fe5443e65f118aea52 (diff)
call ether_ioctl(), fix pr/2371; jason@ ok
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/hme.c31
1 files changed, 7 insertions, 24 deletions
diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c
index bec460f2109..57a35a432a5 100644
--- a/sys/dev/ic/hme.c
+++ b/sys/dev/ic/hme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hme.c,v 1.12 2001/10/09 15:07:20 jason Exp $ */
+/* $OpenBSD: hme.c,v 1.13 2002/02/18 22:48:03 mickey Exp $ */
/* $NetBSD: hme.c,v 1.21 2001/07/07 15:59:37 thorpej Exp $ */
/*-
@@ -69,11 +69,6 @@
#include <netinet/if_ether.h>
#endif
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
#if NBPFILTER > 0
#include <net/bpf.h>
#include <net/bpfdesc.h>
@@ -1028,6 +1023,11 @@ hme_ioctl(ifp, cmd, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return (error);
+ }
+
switch (cmd) {
case SIOCSIFADDR:
@@ -1040,23 +1040,6 @@ hme_ioctl(ifp, cmd, data)
arp_ifinit(&sc->sc_arpcom, ifa);
break;
#endif
-#ifdef NS
- case AF_NS:
- {
- struct ns_addr *ina = &IA_SNS(ifa)->sns_addr;
-
- if (ns_nullhost(*ina))
- ina->x_host =
- *(union ns_host *)LLADDR(ifp->if_sadl);
- else {
- memcpy(LLADDR(ifp->if_sadl),
- ina->x_host.c_host, sizeof(sc->sc_enaddr));
- }
- /* Set new address. */
- hme_init(sc);
- break;
- }
-#endif
default:
hme_init(sc);
break;
@@ -1113,7 +1096,7 @@ hme_ioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
+ error = ENOTTY;
break;
}