diff options
author | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2008-05-07 07:16:50 +0000 |
---|---|---|
committer | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2008-05-07 07:16:50 +0000 |
commit | 4e255224e7d72d76566db678565a58232ef4a98e (patch) | |
tree | b957a51bd12bfceb051fa6291f74202139302706 /sys/net | |
parent | de00169788d17d1afbb465a8138926ecfd201cac (diff) |
Make mpe a point-to-point interface.
Make the mtu user definable.
ok claudio@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_mpe.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c index aee5e894bbb..28c05d5621f 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -68,8 +68,9 @@ mpe_clone_create(struct if_clone *ifc, int unit) mpeif->sc_unit = unit; ifp = &mpeif->sc_if; snprintf(ifp->if_xname, sizeof ifp->if_xname, "mpe%d", unit); + ifp->if_flags = IFF_POINTOPOINT; ifp->if_softc = mpeif; - ifp->if_mtu = 1500; + ifp->if_mtu = MPE_MTU; ifp->if_ioctl = mpeioctl; ifp->if_output = mpeoutput; ifp->if_start = mpestart; @@ -183,6 +184,13 @@ mpeioctl(struct ifnet *ifp, u_long cmd, caddr_t data) else ifp->if_flags &= ~IFF_RUNNING; break; + case SIOCSIFMTU: + if (ifr->ifr_mtu < MPE_MTU_MIN || + ifr->ifr_mtu > MPE_MTU_MAX) + error = EINVAL; + else + ifp->if_mtu = ifr->ifr_mtu; + break; case SIOCGETLABEL: ifm = ifp->if_softc; shim.shim_label = |