diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2005-04-30 08:24:26 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2005-04-30 08:24:26 +0000 |
commit | 29f98bbd408d4b2b126c372f6a676e35dbcb8e5e (patch) | |
tree | dadd4dcf9705b074ded8eddb6b8e1aedd7a72f75 /sys/dev/ic | |
parent | c19e305b00294cdb289939c6af7365cf3072b6b3 (diff) |
check for ETHERMIN in SIOCSIFMTU ioctl; from brad
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/re.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index 109f4184269..d1e20f8e516 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.10 2005/04/30 08:22:23 pvalchev Exp $ */ +/* $OpenBSD: re.c,v 1.11 2005/04/30 08:24:25 pvalchev Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1854,9 +1854,10 @@ re_ioctl(ifp, command, data) } break; case SIOCSIFMTU: - if (ifr->ifr_mtu > RL_JUMBO_MTU) + if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > RL_JUMBO_MTU) error = EINVAL; - ifp->if_mtu = ifr->ifr_mtu; + else + ifp->if_mtu = ifr->ifr_mtu; break; case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { |