From 3b94f3069c6b52c0da16f2398f27fd474010f7a4 Mon Sep 17 00:00:00 2001 From: thompsa Date: Tue, 18 Dec 2007 02:12:03 +0000 Subject: - Use the macro to check the port status has it will also test if its administratively down (!IFF_UP) - Use the same parameters to lagg_link_active() to get the backup port as in the output path, this didnt actually matter in practice as sc_primary is always the first on the port list. MFC after: 3 days --- sys/net/if_lagg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/net/if_lagg.c') diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 53af5fe..27fef3f 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1480,8 +1480,8 @@ lagg_fail_input(struct lagg_softc *sc, struct lagg_port *lp, struct mbuf *m) return (m); } - if (sc->sc_primary->lp_link_state == LINK_STATE_DOWN) { - tmp_tp = lagg_link_active(sc, NULL); + if (!LAGG_PORTACTIVE(sc->sc_primary)) { + tmp_tp = lagg_link_active(sc, sc->sc_primary); /* * If tmp_tp is null, we've recieved a packet when all * our links are down. Weird, but process it anyways. -- cgit v1.1