summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-04-30 19:41:25 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-04-30 19:41:25 +0000
commita141a1065a8d68a9f146033c1bbfb4760a964f5d (patch)
treedcd4c61eee9d0486937ceb3e1147c27ec2a776f3 /sys/dev
parent0595aee715987bfd0dd0e5bd9cb72f9d6262ab7c (diff)
- Add missing break for SIOCSIFADDR
- Allow setting the MTU ok pvalchev@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_vge.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c
index fb8bae660d8..aac89725240 100644
--- a/sys/dev/pci/if_vge.c
+++ b/sys/dev/pci/if_vge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vge.c,v 1.12 2005/04/30 19:24:00 brad Exp $ */
+/* $OpenBSD: if_vge.c,v 1.13 2005/04/30 19:41:24 brad Exp $ */
/* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */
/*
* Copyright (c) 2004
@@ -1780,14 +1780,13 @@ vge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
vge_init(ifp);
break;
}
-#if 0 /* XXX mtu gets reset to 0 at ifconfig up for some reason with this */
+ break;
case SIOCSIFMTU:
- if (ifr->ifr_mtu > ETHERMTU_JUMBO)
+ if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU_JUMBO)
error = EINVAL;
- else
+ else if (ifp->if_mtu != ifr->ifr_mtu)
ifp->if_mtu = ifr->ifr_mtu;
break;
-#endif
case SIOCSIFFLAGS:
if (ifp->if_flags & IFF_UP) {
if (ifp->if_flags & IFF_RUNNING &&