From 178263fac26fef3c5603c307e8f32bf095010b9b Mon Sep 17 00:00:00 2001 From: mvs Date: Mon, 1 Feb 2021 07:44:58 +0000 Subject: [PATCH] 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@ --- sys/net/if_pppx.c | 11 +---------- 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 @@ -919,12 +919,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 - /* * Locks used to protect struct members and global data * I immutable after creation @@ -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); -- 2.20.1