diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-07-23 14:19:53 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-07-23 14:19:53 +0000 |
commit | 58f9e0f19d9f1c81098344fa389379fdb38be382 (patch) | |
tree | ba90c7a76426dcd3412148b3dc65febae733d250 /sbin/route/route.c | |
parent | 15cda80e710eb051ec95a019d436e9f3e1762973 (diff) |
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@
Diffstat (limited to 'sbin/route/route.c')
-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 |