summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2019-01-27 02:40:47 +0000
committerdlg <dlg@openbsd.org>2019-01-27 02:40:47 +0000
commitdf26faed012e549e919f6387dfc172929be02b71 (patch)
treeeef9c3d11de58eef3938f6c3f6d497b5c4b31ba1
parentuse sc as the name of the softc variable. (diff)
downloadwireguard-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.c11
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;