diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-07-03 17:41:51 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-07-03 17:41:51 +0000 |
commit | d4c6c3956226605f3d184af05bc2e33179b903c3 (patch) | |
tree | 17278841a65faad8b12894194b3d32022c5c2a58 /sys/net/if.h | |
parent | 0d2af19c78323e7d0f8ce05a3feb226f7196ca60 (diff) |
LINK_STATE_IS_UP() should consider LINK_STATE_UNKNOWN as an up state.
This is now possible because carp no longer uses LINK_STATE_UNKNOWN
for a state that is considered down. This will simplify a lot of code.
OK mpf@ mcbride@ henning@
Diffstat (limited to 'sys/net/if.h')
-rw-r--r-- | sys/net/if.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if.h b/sys/net/if.h index 29c3f82885d..56e314c2971 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.122 2011/03/13 15:31:41 stsp Exp $ */ +/* $OpenBSD: if.h,v 1.123 2011/07/03 17:41:50 claudio Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -170,7 +170,8 @@ struct ifqueue { #define LINK_STATE_HALF_DUPLEX 5 /* link is up and half duplex */ #define LINK_STATE_FULL_DUPLEX 6 /* link is up and full duplex */ -#define LINK_STATE_IS_UP(_s) ((_s) >= LINK_STATE_UP) +#define LINK_STATE_IS_UP(_s) \ + ((_s) >= LINK_STATE_UP || (_s) == LINK_STATE_UNKNOWN) /* * Status bit descriptions for the various interface types. |