diff options
Diffstat (limited to 'usr.sbin/snmpd/mib.c')
-rw-r--r-- | usr.sbin/snmpd/mib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c index afaaab94819..9c088a63d03 100644 --- a/usr.sbin/snmpd/mib.c +++ b/usr.sbin/snmpd/mib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mib.c,v 1.44 2011/04/10 03:20:59 guenther Exp $ */ +/* $OpenBSD: mib.c,v 1.45 2011/07/04 04:34:14 claudio Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net> @@ -958,14 +958,14 @@ mib_iftable(struct oid *oid, struct ber_oid *o, struct ber_element **elm) break; case 8: /* ifOperStatus */ - if ((kif->if_flags & IFF_UP) == 0) { + if ((kif->if_flags & IFF_UP) == 0) i = 2; /* down(2) */ - } else if (LINK_STATE_IS_UP(kif->if_link_state)) { + else if (kif->if_link_state == LINK_STATE_UNKNOWN) + i = 4; /* unknown(4) */ + else if (LINK_STATE_IS_UP(kif->if_link_state)) i = 1; /* up(1) */ - } else if (kif->if_link_state == LINK_STATE_DOWN) { + else i = 7; /* lowerLayerDown(7) or dormant(5)? */ - } else - i = 4; /* unknown(4) */ ber = ber_add_integer(ber, i); break; case 9: |