diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-10-28 07:10:10 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-10-28 07:10:10 +0000 |
commit | df8cbcea9a3712e98e5800b607200f7c2aa744fc (patch) | |
tree | 943eff49ef491b8978e8aa4e853e1042b03043a5 /sys/net | |
parent | ea6211d9f6cf0948dc6ebb1480801f9d4f7e446f (diff) |
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@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_trunk.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 <reyk@openbsd.org> @@ -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: |