diff options
author | ache <ache@FreeBSD.org> | 1997-07-26 20:13:56 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-07-26 20:13:56 +0000 |
commit | 7ddb9c4a548f76c6f53cbbe6b90a6e1ef3ba5c5a (patch) | |
tree | 0fcbcfdf9769a748efa9c919542623ca95eace68 /sys/net/if_sl.c | |
parent | 183f1f7031662853b0b679cd0903312ef2d62441 (diff) | |
download | FreeBSD-src-7ddb9c4a548f76c6f53cbbe6b90a6e1ef3ba5c5a.zip FreeBSD-src-7ddb9c4a548f76c6f53cbbe6b90a6e1ef3ba5c5a.tar.gz |
SUNIT: exchange back whole ifnet structures since they are in the linked
list, not device numbers only
Diffstat (limited to 'sys/net/if_sl.c')
-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 ceb81b1..6361196 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; } |