Folks, Does the ifTable cache have the DONT_FREE_BEFORE_LOAD and DONT_FREE_EXPIRED flags set on purpose? (Reference: agent/mibgroup/if-mib/ifTable/ifTable_data_access.c:149).
These flags are causing stale VLAN interface entries being reported. # snmpwalk localhost ifName IF-MIB::ifName.1 = STRING: eth0 IF-MIB::ifName.2 = STRING: eth1 IF-MIB::ifName.3 = STRING: eth2 IF-MIB::ifName.4 = STRING: eth3 IF-MIB::ifName.5 = STRING: lo IF-MIB::ifName.6 = STRING: eth4 IF-MIB::ifName.7 = STRING: tunl0 IF-MIB::ifName.8 = STRING: gre0 IF-MIB::ifName.9 = STRING: sit0 IF-MIB::ifName.10 = STRING: ip6tnl0 IF-MIB::ifName.36 = STRING: eth0.100 # vconfig rem eth0.100 Removed VLAN -:eth0.100:- # sleep 30 # snmpwalk localhost ifName IF-MIB::ifName.1 = STRING: eth0 IF-MIB::ifName.2 = STRING: eth1 IF-MIB::ifName.3 = STRING: eth2 IF-MIB::ifName.4 = STRING: eth3 IF-MIB::ifName.5 = STRING: lo IF-MIB::ifName.6 = STRING: eth4 IF-MIB::ifName.7 = STRING: tunl0 IF-MIB::ifName.8 = STRING: gre0 IF-MIB::ifName.9 = STRING: sit0 IF-MIB::ifName.10 = STRING: ip6tnl0 IF-MIB::ifName.36 = STRING: eth0.100 <======= stale entry Every IFTABLE_CACHE_TIMEOUT seconds, the _cache_load() function is called and it re-enumerates the interface list (/proc/net/dev on Linux). However, the _cache_free() function of the ifTable cache does not ever seem to get called and the stale interface entries seem to remain. Is there a reason the cache is not invalidated before calling _cache_load()? Performance comes to mind, but _cache_load() is called every so often to enumerate the interfaces, so a _cache_free() before is logical? If I do not set the NETSNMP_CACHE_DONT_FREE_BEFORE_LOAD flag in ifTable_container_init(), it works fine. Many thanks - Tushar ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders