diff options
author | dg <dg@FreeBSD.org> | 1995-07-06 11:55:18 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-07-06 11:55:18 +0000 |
commit | 72be2e09b96564925d0e0e36d36518ac076f19b4 (patch) | |
tree | aa0a5e6a8714f250c28e30e3ef411500200a1ca6 /sys/net | |
parent | 21036bccfd267479c2ca00a9753138d46d94d41e (diff) | |
download | FreeBSD-src-72be2e09b96564925d0e0e36d36518ac076f19b4.zip FreeBSD-src-72be2e09b96564925d0e0e36d36518ac076f19b4.tar.gz |
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").
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_sl.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 346bd91..669315c 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -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; |