diff options
author | mvs <mvs@cvs.openbsd.org> | 2021-02-01 07:44:59 +0000 |
---|---|---|
committer | mvs <mvs@cvs.openbsd.org> | 2021-02-01 07:44:59 +0000 |
commit | e3b09772a5c472fd3f6239de2704f765e84c6904 (patch) | |
tree | 4c1e50be8c35bcefbe179a908e9b34424f4fb157 | |
parent | 0f8b6d67e12596063b7ff54a8456680ee095aa7d (diff) |
Remove dummy TUNSIFMODE ioctl(2) call from pppac(4) and npppd(8). Since
OpenBSD 6.7 npppd(8) can't work over tun(4).
ok yasuoka@
-rw-r--r-- | sys/net/if_pppx.c | 11 | ||||
-rw-r--r-- | usr.sbin/npppd/npppd/npppd_iface.c | 15 |
2 files changed, 3 insertions, 23 deletions
diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c index fe498eaba22..75be8ff7810 100644 --- a/sys/net/if_pppx.c +++ b/sys/net/if_pppx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppx.c,v 1.106 2020/12/25 12:59:53 visa Exp $ */ +/* $OpenBSD: if_pppx.c,v 1.107 2021/02/01 07:44:58 mvs Exp $ */ /* * Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org> @@ -920,12 +920,6 @@ pppx_if_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) RBT_GENERATE(pppx_ifs, pppx_if, pxi_entry, pppx_if_cmp); /* - * pppac(4) - PPP Access Concentrator interface - */ - -#include <net/if_tun.h> - -/* * Locks used to protect struct members and global data * I immutable after creation * K kernel lock @@ -1188,9 +1182,6 @@ pppacioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) NET_LOCK(); switch (cmd) { - case TUNSIFMODE: /* make npppd happy */ - break; - case FIONBIO: break; case FIONREAD: diff --git a/usr.sbin/npppd/npppd/npppd_iface.c b/usr.sbin/npppd/npppd/npppd_iface.c index 54835c73b8d..103520f0336 100644 --- a/usr.sbin/npppd/npppd/npppd_iface.c +++ b/usr.sbin/npppd/npppd/npppd_iface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_iface.c,v 1.14 2021/01/02 13:15:15 mvs Exp $ */ +/* $OpenBSD: npppd_iface.c,v 1.15 2021/02/01 07:44:58 mvs Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: npppd_iface.c,v 1.14 2021/01/02 13:15:15 mvs Exp $ */ +/* $Id: npppd_iface.c,v 1.15 2021/02/01 07:44:58 mvs Exp $ */ /**@file * The interface of npppd and kernel. * This is an implementation to use tun(4) or pppx(4). @@ -275,7 +275,6 @@ npppd_iface_reinit(npppd_iface *_this, struct iface *iface) int npppd_iface_start(npppd_iface *_this) { - int x; char buf[PATH_MAX]; NPPPD_IFACE_ASSERT(_this != NULL); @@ -287,16 +286,6 @@ npppd_iface_start(npppd_iface *_this) goto fail; } - if (_this->using_pppx == 0) { - x = IFF_BROADCAST; - if (ioctl(_this->devf, TUNSIFMODE, &x) != 0) { - npppd_iface_log(_this, LOG_ERR, - "ioctl(TUNSIFMODE=IFF_BROADCAST) failed " - "in %s(): %m", __func__); - goto fail; - } - } - event_set(&_this->ev, _this->devf, EV_READ | EV_PERSIST, npppd_iface_io_event_handler, _this); event_add(&_this->ev, NULL); |