diff options
author | 2019-01-27 02:40:47 +0000 | |
---|---|---|
committer | 2019-01-27 02:40:47 +0000 | |
commit | df26faed012e549e919f6387dfc172929be02b71 (patch) | |
tree | eef9c3d11de58eef3938f6c3f6d497b5c4b31ba1 | |
parent | use sc as the name of the softc variable. (diff) | |
download | wireguard-openbsd-df26faed012e549e919f6387dfc172929be02b71.tar.xz wireguard-openbsd-df26faed012e549e919f6387dfc172929be02b71.zip |
let ether_ioctl handle the mtu. set hardmtu to ETHER_MAX_HARDMTU_LEN.
as well as allowing for larger frames to be transported, it also
gets rid of the dependancy on mpe defines.
-rw-r--r-- | sys/net/if_mpw.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/net/if_mpw.c b/sys/net/if_mpw.c index 676e567ecb3..24598bdb78b 100644 --- a/sys/net/if_mpw.c +++ b/sys/net/if_mpw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpw.c,v 1.27 2019/01/27 02:24:49 dlg Exp $ */ +/* $OpenBSD: if_mpw.c,v 1.28 2019/01/27 02:40:47 dlg Exp $ */ /* * Copyright (c) 2015 Rafael Zalamena <rzalamena@openbsd.org> @@ -93,6 +93,7 @@ mpw_clone_create(struct if_clone *ifc, int unit) ifp->if_ioctl = mpw_ioctl; ifp->if_output = mpw_output; ifp->if_start = mpw_start; + ifp->if_hardmtu = ETHER_MAX_HARDMTU_LEN; IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); ether_fakeaddr(ifp); @@ -138,14 +139,6 @@ mpw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) struct ifmpwreq imr; switch (cmd) { - 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 SIOCSIFFLAGS: if ((ifp->if_flags & IFF_UP)) ifp->if_flags |= IFF_RUNNING; |