Worked around a bug with if.c setting the interface up even when we don't

want it to.
This commit is contained in:
David Greenman 1995-07-07 01:13:49 +00:00
parent 03aa8f08c7
commit ef59de8517
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9415

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
* $Id: if_sl.c,v 1.24 1995/07/02 09:01:02 joerg Exp $
* $Id: if_sl.c,v 1.25 1995/07/06 11:55:18 davidg Exp $
*/
/*
@ -908,7 +908,20 @@ slioctl(ifp, cmd, data)
switch (cmd) {
case SIOCSIFFLAGS:
/*
* if.c will set the interface up even if we
* don't want it to.
*/
if (sl_softc[ifp->if_unit].sc_ttyp == NULL) {
ifp->if_flags &= ~IFF_UP;
}
break;
case SIOCSIFADDR:
/*
* This is "historical" - set the interface up when
* setting the address.
*/
if (ifa->ifa_addr->sa_family == AF_INET) {
if (sl_softc[ifp->if_unit].sc_ttyp != NULL)
if_up(ifp);