Do not allow changing MTU to be less than the minimum.

This commit is contained in:
yongari 2011-11-07 22:58:49 +00:00
parent 711c65d39d
commit 89ad5455c3

View File

@ -3396,7 +3396,7 @@ ti_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
switch (command) {
case SIOCSIFMTU:
TI_LOCK(sc);
if (ifr->ifr_mtu > TI_JUMBO_MTU)
if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > TI_JUMBO_MTU)
error = EINVAL;
else {
ifp->if_mtu = ifr->ifr_mtu;