diff options
| author | David Greenman <dg@FreeBSD.org> | 1994-08-08 12:09:04 +0000 |
|---|---|---|
| committer | David Greenman <dg@FreeBSD.org> | 1994-08-08 12:09:04 +0000 |
| commit | 90fd8c386689fa029f81849f4dbeaf9f82ef769d (patch) | |
| tree | a10bb943fa1f7146f3cad03b0c71acfffff374e9 | |
| parent | 660255695feffd2626a5f9d798372aff104f705e (diff) | |
Notes
| -rw-r--r-- | sys/dev/ed/if_ed.c | 18 | ||||
| -rw-r--r-- | sys/i386/isa/if_ed.c | 18 | ||||
| -rw-r--r-- | sys/net/if_loop.c | 9 |
3 files changed, 36 insertions, 9 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index 77352a5e7500..35cc4b1f3f82 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; } diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c index 77352a5e7500..35cc4b1f3f82 100644 --- a/sys/i386/isa/if_ed.c +++ b/sys/i386/isa/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; } diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index ff29dc054ebb..871202c07a3e 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_loop.c 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: if_loop.c,v 1.5 1994/08/02 07:46:17 davidg Exp $ */ /* @@ -208,7 +208,7 @@ loioctl(ifp, cmd, data) caddr_t data; { register struct ifaddr *ifa; - register struct ifreq *ifr; + register struct ifreq *ifr = (struct ifreq *)data; register int error = 0; switch (cmd) { @@ -225,7 +225,6 @@ loioctl(ifp, cmd, data) case SIOCADDMULTI: case SIOCDELMULTI: - ifr = (struct ifreq *)data; if (ifr == 0) { error = EAFNOSUPPORT; /* XXX */ break; @@ -243,6 +242,10 @@ loioctl(ifp, cmd, data) } break; + case SIOCSIFMTU: + ifp->if_mtu = ifr->ifr_mtu; + break; + default: error = EINVAL; } |
