freebsd_network: Fix SIOCSIFMTU handling in ether_ioctl.
We cannot set anything below ETHERMIN nor greater than ETHERMTU here, because we do not know what capabilities the driver actually has. (The driver will have already caught and handled this ioctl if it supports something more than the required minimum.)
This commit is contained in:
@@ -839,7 +839,7 @@ ether_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
||||
|
||||
switch (command) {
|
||||
case SIOCSIFMTU:
|
||||
if (ifr->ifr_mtu > ETHERMTU_JUMBO)
|
||||
if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU)
|
||||
return EINVAL;
|
||||
ifp->if_mtu = ifr->ifr_mtu;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user