diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1997-07-26 20:13:56 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1997-07-26 20:13:56 +0000 |
commit | 1d7adc8bea09c232408e47fa5ff52bc75189386f (patch) | |
tree | f3a6195cb05c793ddd4da1c4b95b3e068a1b1f3a | |
parent | efd4ad4cd26f85098ea32af7c1547b9bc3cb63a1 (diff) | |
download | src-1d7adc8bea09c232408e47fa5ff52bc75189386f.tar.gz src-1d7adc8bea09c232408e47fa5ff52bc75189386f.zip |
SUNIT: exchange back whole ifnet structures since they are in the linked
list, not device numbers only
Notes
Notes:
svn path=/head/; revision=27711
-rw-r--r-- | sys/net/if_sl.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index ceb81b196505..636119626722 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.53 1997/07/26 18:47:56 ache Exp $ + * $Id: if_sl.c,v 1.54 1997/07/26 19:09:12 ache Exp $ */ /* @@ -377,18 +377,17 @@ sltioctl(tp, cmd, data, flag, p) case SLIOCSUNIT: if (sc->sc_if.if_unit != *(u_int *)data) { - int scunit = sc->sc_if.if_unit; - struct sl_softc *nc, tmpc; + struct sl_softc *nc, tmpnc; for (nsl = NSL, nc = sl_softc; --nsl >= 0; nc++) { if ( nc->sc_if.if_unit == *(u_int *)data && nc->sc_ttyp == NULL ) { - tmpc = *nc; + tmpnc = *nc; *nc = *sc; - nc->sc_if.if_unit = *(u_int *)data; - *sc = tmpc; - sc->sc_if.if_unit = scunit; + nc->sc_if = tmpnc.sc_if; + tmpnc.sc_if = sc->sc_if; + *sc = tmpnc; tp->t_sc = sc = nc; goto slfound; } |