From 8ae7dba658fe236241b10b722d132f73bb118538 Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Sun, 17 Sep 2000 19:10:57 +0000 Subject: implement SIOCSIFMTU, okay deraadt@ --- sys/dev/ic/elink3.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sys/dev/ic/elink3.c') 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) { -- cgit v1.2.3