diff options
author | 2009-07-23 14:19:52 +0000 | |
---|---|---|
committer | 2009-07-23 14:19:52 +0000 | |
commit | eba00585cc28428d7e02ee49d7246c476fad69e0 (patch) | |
tree | ce7a3fa1a0084b79c3ef96d17061fc761ab0be74 | |
parent | C-d is delete as well in emacs mode. (diff) | |
download | wireguard-openbsd-eba00585cc28428d7e02ee49d7246c476fad69e0.tar.xz wireguard-openbsd-eba00585cc28428d7e02ee49d7246c476fad69e0.zip |
Only print unknown in RTM_IFINFO messages when the link is in
LINK_STATE_UNKOWN. In the other case use LINK_STATE_IS_UP() to
print either "up" or "down". OK henning@, sthen@
-rw-r--r-- | sbin/route/route.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index fcb83dbdf6a..e69f8c7a1fd 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.135 2009/06/27 11:35:57 michele Exp $ */ +/* $OpenBSD: route.c,v 1.136 2009/07/23 14:19:52 claudio Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -1248,7 +1248,10 @@ get_linkstate(int mt, int link_state) } } - return ("unknown"); + if (LINK_STATE_IS_UP(link_state)) + return ("up"); + else + return ("down"); } void |