mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Do not allow pppoe(4) interfaces to be attached to anything but Ethernet
or VLAN interfaces. Based on a similar change from NetBSD. ok canacar@
This commit is contained in:
parent
3e90544b1e
commit
b575845a20
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: if_pppoe.c,v 1.15 2008/03/12 17:27:03 canacar Exp $ */
|
||||
/* $OpenBSD: if_pppoe.c,v 1.16 2008/03/14 02:56:26 brad Exp $ */
|
||||
/* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */
|
||||
|
||||
/*
|
||||
@ -900,8 +900,12 @@ pppoe_ioctl(struct ifnet *ifp, unsigned long cmd, caddr_t data)
|
||||
return (error);
|
||||
if (parms->eth_ifname[0] != '\0') {
|
||||
sc->sc_eth_if = ifunit(parms->eth_ifname);
|
||||
if (sc->sc_eth_if == NULL)
|
||||
if (sc->sc_eth_if == NULL ||
|
||||
(sc->sc_eth_if->if_type != IFT_ETHER &&
|
||||
sc->sc_eth_if->if_type != IFT_L2VLAN)) {
|
||||
sc->sc_eth_if = NULL;
|
||||
return (ENXIO);
|
||||
}
|
||||
}
|
||||
|
||||
if (sc->sc_concentrator_name)
|
||||
|
Loading…
Reference in New Issue
Block a user