summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-08-08 12:09:04 +0000
committerdg <dg@FreeBSD.org>1994-08-08 12:09:04 +0000
commit51d1879366096c6389ea3036869556b71408f037 (patch)
treea10bb943fa1f7146f3cad03b0c71acfffff374e9 /sys/dev
parent4eb7e7f1c4f88d90fb0b4d34026548de68a78528 (diff)
downloadFreeBSD-src-51d1879366096c6389ea3036869556b71408f037.zip
FreeBSD-src-51d1879366096c6389ea3036869556b71408f037.tar.gz
Added ioctl support for SIOCSIFMTU.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ed/if_ed.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 77352a5..35cc4b1 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
- * $Id: if_ed.c,v 1.39 1994/08/02 07:39:28 davidg Exp $
+ * $Id: if_ed.c,v 1.40 1994/08/04 17:42:33 davidg Exp $
*/
#include "ed.h"
@@ -2127,8 +2127,8 @@ ed_ioctl(ifp, command, data)
* Update out multicast list.
*/
error = (command == SIOCADDMULTI) ?
- ether_addmulti((struct ifreq *) data, &sc->arpcom) :
- ether_delmulti((struct ifreq *) data, &sc->arpcom);
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti((ifr, &sc->arpcom);
if (error == ENETRESET) {
@@ -2141,6 +2141,18 @@ ed_ioctl(ifp, command, data)
}
break;
#endif
+ case SIOCSIFMTU:
+
+ /*
+ * Set the interface MTU.
+ */
+ if (ifr->ifr_mtu > ETHERMTU) {
+ error = EINVAL;
+ } else {
+ ifp->if_mtu = ifr->ifr_mtu;
+ }
+ break;
+
default:
error = EINVAL;
}
OpenPOWER on IntegriCloud