mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Modified joerg's last change to only set the interface "up" when setting
the address if the device is a SLIP device (i.e. "attached").
This commit is contained in:
parent
39d38f93e2
commit
93ff4e36e3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9412
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
|
||||
* $Id: if_sl.c,v 1.23 1995/06/21 10:13:23 davidg Exp $
|
||||
* $Id: if_sl.c,v 1.24 1995/07/02 09:01:02 joerg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -909,9 +909,14 @@ slioctl(ifp, cmd, data)
|
||||
switch (cmd) {
|
||||
|
||||
case SIOCSIFADDR:
|
||||
if (ifa->ifa_addr->sa_family == AF_INET)
|
||||
ifp->if_flags |= IFF_UP;
|
||||
/* FALLTHROUGH */
|
||||
if (ifa->ifa_addr->sa_family == AF_INET) {
|
||||
if (sl_softc[ifp->if_unit].sc_ttyp != NULL)
|
||||
if_up(ifp);
|
||||
} else {
|
||||
error = EAFNOSUPPORT;
|
||||
}
|
||||
break;
|
||||
|
||||
case SIOCSIFDSTADDR:
|
||||
if (ifa->ifa_addr->sa_family != AF_INET)
|
||||
error = EAFNOSUPPORT;
|
||||
|
Loading…
Reference in New Issue
Block a user