diff options
author | mvs <mvs@cvs.openbsd.org> | 2021-01-19 19:38:30 +0000 |
---|---|---|
committer | mvs <mvs@cvs.openbsd.org> | 2021-01-19 19:38:30 +0000 |
commit | e35f9344674a82696eef94f7cadaf784a866c2a3 (patch) | |
tree | 067a5a92a9d406a7a804a287dd6841e50300875f /sys/net/if_pppoe.c | |
parent | f5bc3fd1fc5c30e54e31744469b6a65853ef6149 (diff) |
pppoe(4): convert ifunit() to if_unit(9)
ok dlg@ kn@
Diffstat (limited to 'sys/net/if_pppoe.c')
-rw-r--r-- | sys/net/if_pppoe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c index b6ece4239b2..a31b3e3f4fe 100644 --- a/sys/net/if_pppoe.c +++ b/sys/net/if_pppoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppoe.c,v 1.76 2021/01/04 21:21:41 kn Exp $ */ +/* $OpenBSD: if_pppoe.c,v 1.77 2021/01/19 19:38:29 mvs Exp $ */ /* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */ /* @@ -793,8 +793,9 @@ pppoe_ioctl(struct ifnet *ifp, unsigned long cmd, caddr_t data) if (parms->eth_ifname[0] != '\0') { struct ifnet *eth_if; - eth_if = ifunit(parms->eth_ifname); + eth_if = if_unit(parms->eth_ifname); if (eth_if == NULL || eth_if->if_type != IFT_ETHER) { + if_put(eth_if); sc->sc_eth_ifidx = 0; return (ENXIO); } @@ -805,6 +806,7 @@ pppoe_ioctl(struct ifnet *ifp, unsigned long cmd, caddr_t data) PPPOE_OVERHEAD; } sc->sc_eth_ifidx = eth_if->if_index; + if_put(eth_if); } if (sc->sc_concentrator_name) |