summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMarco Pfatschbacher <mpf@cvs.openbsd.org>2008-06-13 07:03:46 +0000
committerMarco Pfatschbacher <mpf@cvs.openbsd.org>2008-06-13 07:03:46 +0000
commit31a58aca824891e7ed7fa4145af587674c24a34b (patch)
tree1aaf9adc416014b9a2a7f20b4e98be16bc61d811 /sys/net
parentd3889080eb68e1f605dce973cefcdbc98a9bfb43 (diff)
Treat LINK_STATE_UNKNOWN as LINK_STATE_UP.
This restores the old behaviour where we were checking for != LINK_STATE_DOWN. Fixes the ethernet to wireless failover feature and also allows trunk(4) to be used within qemu. Tested by sturm@. OK reyk@. "grumble, we should fix more drivers' link state handling" brad@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_trunk.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_trunk.h b/sys/net/if_trunk.h
index b86d47b76e6..e00b57f3157 100644
--- a/sys/net/if_trunk.h
+++ b/sys/net/if_trunk.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.h,v 1.14 2007/10/22 14:48:52 pyr Exp $ */
+/* $OpenBSD: if_trunk.h,v 1.15 2008/06/13 07:03:45 mpf Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -119,9 +119,9 @@ struct trunk_port {
#define tp_capabilities tp_if->if_capabilities /* capabilities */
#define TRUNK_PORTACTIVE(_tp) ( \
- (LINK_STATE_IS_UP((_tp)->tp_link_state)) && \
- ((_tp)->tp_ifflags & IFF_UP) \
-)
+ (LINK_STATE_IS_UP((_tp)->tp_link_state) || \
+ (_tp)->tp_link_state == LINK_STATE_UNKNOWN) && \
+ (_tp)->tp_ifflags & IFF_UP)
struct trunk_mc {
union {