summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-05-16 02:15:24 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-05-16 02:15:24 +0000
commit7504f8d83a0b59203a9d5355c0cc88f69f8b616c (patch)
treef87a19278f0b2f59a4fc58840d13fdd85761722c /sys/dev/ic
parent7719922491e51e0bccafbf7cf1d2486b07ddd7f9 (diff)
only allow setting Jumbo MTU frame sizes with the 8169 chipset.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/re.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index 777c5b61f51..a76874e54f9 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.19 2006/03/25 22:41:43 djm Exp $ */
+/* $OpenBSD: re.c,v 1.20 2006/05/16 02:15:23 brad Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -1772,7 +1772,11 @@ re_ioctl(ifp, command, data)
}
break;
case SIOCSIFMTU:
- if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > RL_JUMBO_MTU)
+ if (ifr->ifr_mtu < ETHERMIN ||
+ ((sc->rl_type == RL_8169 &&
+ ifr->ifr_mtu > RL_JUMBO_MTU) ||
+ (sc->rl_type == RL_8139 &&
+ ifr->ifr_mtu > ETHERMTU)))
error = EINVAL;
else if (ifp->if_mtu != ifr->ifr_mtu)
ifp->if_mtu = ifr->ifr_mtu;