diff options
Diffstat (limited to 'usr.sbin/snmpd/mib.c')
-rw-r--r-- | usr.sbin/snmpd/mib.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c index 3958b0c48f0..fb8e61cf71b 100644 --- a/usr.sbin/snmpd/mib.c +++ b/usr.sbin/snmpd/mib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mib.c,v 1.33 2010/01/11 06:38:41 deraadt Exp $ */ +/* $OpenBSD: mib.c,v 1.34 2010/01/11 11:15:03 deraadt Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net> @@ -881,11 +881,12 @@ mib_ifget(u_int idx) if (kif == NULL) return (NULL); } + idx = kif->if_index; /* Update interface information */ - kr_updateif(kif->if_index); - if ((kif = kr_getif(kif->if_index)) == NULL) { - log_debug("mib_ifxtable: interface disappeared?"); + kr_updateif(idx); + if ((kif = kr_getif(idx)) == NULL) { + log_debug("mib_ifxtable: interface %d disappeared?", idx); return (NULL); } |