diff options
author | Chris Cappuccio <chris@cvs.openbsd.org> | 2000-04-27 00:00:26 +0000 |
---|---|---|
committer | Chris Cappuccio <chris@cvs.openbsd.org> | 2000-04-27 00:00:26 +0000 |
commit | 6efc612ede960677ccc538d52e5ebb06117e09ea (patch) | |
tree | 44a226832a2c4c3832acc4e350c40c42f994338f /sys/dev/ic/fxp.c | |
parent | 2ff690a15797dceababa2e77f7dca9567657c9b9 (diff) |
Fix SIOCSIFMTU
Diffstat (limited to 'sys/dev/ic/fxp.c')
-rw-r--r-- | sys/dev/ic/fxp.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 4d19ead4464..c3743059622 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -1415,10 +1415,18 @@ fxp_ioctl(ifp, command, data) 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; |