summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-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) ?