From df8cbcea9a3712e98e5800b607200f7c2aa744fc Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 28 Oct 2008 07:10:10 +0000 Subject: Show the ACTIVE flag in ifconfig for the single interface that is actually 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. From FreeBSD Tested by jmc@ Ok mpf@ --- sys/net/if_trunk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/net') diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index 14a19a2db31..b5fa059ea1d 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.51 2008/10/02 20:21:14 brad Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.52 2008/10/28 07:10:09 brad Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter @@ -595,6 +595,11 @@ trunk_port2req(struct trunk_port *tp, struct trunk_reqport *rp) /* Add protocol specific flags */ switch (tr->tr_proto) { case TRUNK_PROTO_FAILOVER: + rp->rp_flags = tp->tp_flags; + if (tp == trunk_link_active(tr, tr->tr_primary)) + rp->rp_flags |= TRUNK_PORT_ACTIVE; + break; + case TRUNK_PROTO_ROUNDROBIN: case TRUNK_PROTO_LOADBALANCE: case TRUNK_PROTO_BROADCAST: -- cgit v1.2.3