summaryrefslogtreecommitdiff
path: root/sys/dev/ic/elink3.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2000-09-17 19:10:57 +0000
committerNiels Provos <provos@cvs.openbsd.org>2000-09-17 19:10:57 +0000
commit8ae7dba658fe236241b10b722d132f73bb118538 (patch)
tree2314fa13c1072321f69b1f41e9cd43aecd622c13 /sys/dev/ic/elink3.c
parente32129e4c9da5b5846eaf18ee03fce8f4bbe0952 (diff)
implement SIOCSIFMTU, okay deraadt@
Diffstat (limited to 'sys/dev/ic/elink3.c')
-rw-r--r--sys/dev/ic/elink3.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c
index 18211c722e6..1ee235808fa 100644
--- a/sys/dev/ic/elink3.c
+++ b/sys/dev/ic/elink3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elink3.c,v 1.43 2000/09/17 00:06:01 aaron Exp $ */
+/* $OpenBSD: elink3.c,v 1.44 2000/09/17 19:10:56 provos Exp $ */
/* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */
/*
@@ -1525,6 +1525,15 @@ epioctl(ifp, cmd, data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
break;
+ case SIOCSIFMTU:
+ if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
+ error = EINVAL;
+ } else if (ifp->if_mtu != ifr->ifr_mtu) {
+ ifp->if_mtu = ifr->ifr_mtu;
+ }
+ break;
+
+
case SIOCSIFFLAGS:
if ((ifp->if_flags & IFF_UP) == 0 &&
(ifp->if_flags & IFF_RUNNING) != 0) {