summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-02-21 19:34:49 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-02-21 19:34:49 +0000
commit7b976e3a6108cee940df30b649d0db4968fe77ff (patch)
treed1eafa0a50bad5bee77516a2216892fdde9176d3 /sys/dev/ic
parent71d3927036e409f9cd9ac648eb6db1ee1d9f04bf (diff)
add missing MTU ioctl switch case.
Noticed by: Ben Lovett <ben at tilderoot dot com>
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/gem.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c
index 4375b7b579c..16792cdc16b 100644
--- a/sys/dev/ic/gem.c
+++ b/sys/dev/ic/gem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gem.c,v 1.54 2006/02/08 22:11:02 brad Exp $ */
+/* $OpenBSD: gem.c,v 1.55 2006/02/21 19:34:48 brad Exp $ */
/* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */
/*
@@ -1375,16 +1375,14 @@ gem_ioctl(ifp, cmd, data)
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
-
+ gem_init(ifp);
switch (ifa->ifa_addr->sa_family) {
#ifdef INET
case AF_INET:
- gem_init(ifp);
arp_ifinit(&sc->sc_arpcom, ifa);
break;
#endif
default:
- gem_init(ifp);
break;
}
break;
@@ -1408,6 +1406,14 @@ gem_ioctl(ifp, cmd, data)
#endif
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 SIOCADDMULTI:
case SIOCDELMULTI:
error = (cmd == SIOCADDMULTI) ?