diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2008-12-19 14:02:21 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2008-12-19 14:02:21 +0000 |
commit | 34335e08034260b96098433b3174dee4f61280f0 (patch) | |
tree | 33c62e249989f2f967c9ddccadf15d294ce7dae9 | |
parent | b9927bc5cd60a77419e1a480d46c8df46d97d6d9 (diff) |
fix IF-MIB element and implementation ifInUnknownErrors -> ifInUnknownProtos
-rw-r--r-- | usr.sbin/snmpd/mib.c | 8 | ||||
-rw-r--r-- | usr.sbin/snmpd/mib.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c index ab754351388..cc4a3dda78c 100644 --- a/usr.sbin/snmpd/mib.c +++ b/usr.sbin/snmpd/mib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mib.c,v 1.28 2008/12/08 11:34:55 reyk Exp $ */ +/* $OpenBSD: mib.c,v 1.29 2008/12/19 14:02:20 reyk Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net> @@ -845,7 +845,7 @@ static struct oid if_mib[] = { { MIB(ifInNUcastPkts), OID_TRD, mib_iftable }, { MIB(ifInDiscards), OID_TRD, mib_iftable }, { MIB(ifInErrors), OID_TRD, mib_iftable }, - { MIB(ifInUnknownErrors), OID_TRD, mib_iftable }, + { MIB(ifInUnknownProtos), OID_TRD, mib_iftable }, { MIB(ifOutOctets), OID_TRD, mib_iftable }, { MIB(ifOutUcastPkts), OID_TRD, mib_iftable }, { MIB(ifOutNUcastPkts), OID_TRD, mib_iftable }, @@ -992,7 +992,7 @@ mib_iftable(struct oid *oid, struct ber_oid *o, struct ber_element **elm) ber_set_header(ber, BER_CLASS_APPLICATION, SNMP_T_COUNTER32); break; case 15: - ber = ber_add_integer(ber, 0); /* unknown errors? */ + ber = ber_add_integer(ber, (u_int32_t)kif->if_noproto); ber_set_header(ber, BER_CLASS_APPLICATION, SNMP_T_COUNTER32); break; case 16: @@ -1016,7 +1016,7 @@ mib_iftable(struct oid *oid, struct ber_oid *o, struct ber_element **elm) kif->if_name, strerror(errno)); return (-1); } - ber = ber_add_integer(ber, kif->if_noproto + ifq); + ber = ber_add_integer(ber, ifq); ber_set_header(ber, BER_CLASS_APPLICATION, SNMP_T_COUNTER32); break; case 20: diff --git a/usr.sbin/snmpd/mib.h b/usr.sbin/snmpd/mib.h index c77df3e12e3..6f4ff2fc719 100644 --- a/usr.sbin/snmpd/mib.h +++ b/usr.sbin/snmpd/mib.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mib.h,v 1.17 2008/12/05 16:06:20 reyk Exp $ */ +/* $OpenBSD: mib.h,v 1.18 2008/12/19 14:02:20 reyk Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net> @@ -257,7 +257,7 @@ #define MIB_ifInNUcastPkts MIB_ifEntry, 12 #define MIB_ifInDiscards MIB_ifEntry, 13 #define MIB_ifInErrors MIB_ifEntry, 14 -#define MIB_ifInUnknownErrors MIB_ifEntry, 15 +#define MIB_ifInUnknownProtos MIB_ifEntry, 15 #define MIB_ifOutOctets MIB_ifEntry, 16 #define MIB_ifOutUcastPkts MIB_ifEntry, 17 #define MIB_ifOutNUcastPkts MIB_ifEntry, 18 @@ -587,7 +587,7 @@ { MIBDECL(ifInNUcastPkts) }, \ { MIBDECL(ifInDiscards) }, \ { MIBDECL(ifInErrors) }, \ - { MIBDECL(ifInUnknownErrors) }, \ + { MIBDECL(ifInUnknownProtos) }, \ { MIBDECL(ifOutOctets) }, \ { MIBDECL(ifOutUcastPkts) }, \ { MIBDECL(ifOutNUcastPkts) }, \ |