-/* $OpenBSD: fxp.c,v 1.3 2000/04/26 19:12:08 chris Exp $ */
+/* $OpenBSD: fxp.c,v 1.4 2000/04/27 00:00:25 chris Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
case SIOCSIFADDR:
case SIOCGIFADDR:
- case SIOCSIFMTU:
error = ether_ioctl(ifp, command, data);
break;
+ case SIOCSIFMTU:
+ if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
+ error = EINVAL;
+ } else if (ifp->if_mtu != ifr->ifr_mtu) {
+ ifp->if_mtu = ifr->ifr_mtu;
+ error = fxp_init(sc);
+ }
+ break;
+
case SIOCSIFFLAGS:
sc->all_mcasts = (ifp->if_flags & IFF_ALLMULTI) ? 1 : 0;
-/* $OpenBSD: if_vlan.c,v 1.2 2000/04/26 22:57:27 chris Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.3 2000/04/27 00:00:24 chris Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
*
* jumbo frames. It would be nice to replace ETHERMTU
* with the parent interface's MTU in the following statement.
*/
- if (ifr->ifr_mtu > ETHERMTU) {
+ if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {
error = EINVAL;
} else {
ifp->if_mtu = ifr->ifr_mtu;