From 5a077cac2f389a08f684b2c73e883d5ecf9a46af Mon Sep 17 00:00:00 2001 From: thompsa Date: Thu, 30 Aug 2007 19:12:10 +0000 Subject: Show the ACTIVE flag in ifconfig for the single interface that is actaully active in failover mode rather than all interfaces with a link. This makes it clear if the master interface is in use or one of the backup links. Found by: Writing the Handbook section Approved by: re (kensmith) --- sys/net/if_lagg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/net/if_lagg.c') diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 22462b3..a0b081a 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -718,6 +718,7 @@ static void lagg_port2req(struct lagg_port *lp, struct lagg_reqport *rp) { struct lagg_softc *sc = lp->lp_softc; + strlcpy(rp->rp_ifname, sc->sc_ifname, sizeof(rp->rp_ifname)); strlcpy(rp->rp_portname, lp->lp_ifp->if_xname, sizeof(rp->rp_portname)); rp->rp_prio = lp->lp_prio; @@ -730,7 +731,10 @@ lagg_port2req(struct lagg_port *lp, struct lagg_reqport *rp) case LAGG_PROTO_FAILOVER: if (lp == sc->sc_primary) rp->rp_flags |= LAGG_PORT_MASTER; - /* FALLTHROUGH */ + if (lp == lagg_link_active(sc, sc->sc_primary)) + rp->rp_flags |= LAGG_PORT_ACTIVE; + break; + case LAGG_PROTO_ROUNDROBIN: case LAGG_PROTO_LOADBALANCE: case LAGG_PROTO_ETHERCHANNEL: -- cgit v1.1