diff options
author | ru <ru@FreeBSD.org> | 2011-05-03 10:11:44 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2011-05-03 10:11:44 +0000 |
commit | 7c2eec4da43667e6140096b789f44026314266c3 (patch) | |
tree | 5e6179ac009a06fe77421e4826c6421f06f2a349 /contrib/bsnmp/snmp_mibII | |
parent | a1d4dd2a37566f73a3a51b3286c7f7b8169b10e3 (diff) | |
download | FreeBSD-src-7c2eec4da43667e6140096b789f44026314266c3.zip FreeBSD-src-7c2eec4da43667e6140096b789f44026314266c3.tar.gz |
Properly detect interface's state in the LINK_STATE_UNKNOWN case.
MFC after: 1 week
Diffstat (limited to 'contrib/bsnmp/snmp_mibII')
-rw-r--r-- | contrib/bsnmp/snmp_mibII/mibII_interfaces.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/bsnmp/snmp_mibII/mibII_interfaces.c b/contrib/bsnmp/snmp_mibII/mibII_interfaces.c index a1817d3..f425a27 100644 --- a/contrib/bsnmp/snmp_mibII/mibII_interfaces.c +++ b/contrib/bsnmp/snmp_mibII/mibII_interfaces.c @@ -289,8 +289,7 @@ op_ifentry(struct snmp_context *ctx, struct snmp_value *value, * cable) and hence return 'dormant'. */ if (ifp->mib.ifmd_flags & IFF_RUNNING) { - if (ifp->mib.ifmd_data.ifi_link_state == - LINK_STATE_DOWN) + if (ifp->mib.ifmd_data.ifi_link_state != LINK_STATE_UP) value->v.integer = 5; /* state dormant */ else value->v.integer = 1; /* state up */ |