Hi,

Find attached two important fixes for net-snmp-5.7.1.

* netsnmp-arp-netlink-fix.patch
  - fixes a problem with my earlier patch that would not reload
    the ARP cache if it was once unloaded
  - optimises the reload to happen only if the cache was actually
    unloaded before
* netsnmp-swinst-crash.patch
  - fixes a crash (happens at least on uclibc systems) when a
    closedir(NULL) is executed under certain conditions

Thanks,
  Timo
--- net-snmp-5.7.1/agent/mibgroup/ip-mib/data_access/arp_netlink.c
+++ /home/fabled//net-snmp-5.7.1.patched/agent/mibgroup/ip-mib/data_access/arp_netlink.c
@@ -43,7 +43,7 @@
     if (cache_timeout != NULL)
         *cache_timeout = 5;
     if (cache_flags != NULL)
-        *cache_flags |= NETSNMP_CACHE_RESET_TIMER_ON_USE;
+        *cache_flags |= NETSNMP_CACHE_RESET_TIMER_ON_USE | NETSNMP_CACHE_DONT_FREE_BEFORE_LOAD;
     access->cache_expired = cache_expired;
 
     DEBUGMSGTL(("access:netlink:arp", "create arp cache\n"));
@@ -131,6 +131,7 @@
          unregister_readfd(fd);
          close(fd);
          access->arch_magic = NULL;
+         access->synchronized = 0;
     }
     return 0;
 }
--- net-snmp-5.7.1/agent/mibgroup/host/data_access/swinst_pkginfo.c
+++ /home/fabled//net-snmp-5.7.1.patched/agent/mibgroup/host/data_access/swinst_pkginfo.c
@@ -140,7 +140,8 @@
         memcpy( entry->swDate, cp, date_len );
         entry->swDate_len = date_len;
     }
-    closedir( d );
+    if (d != NULL)
+        closedir( d );
 
     DEBUGMSGTL(("swinst:load:arch"," loaded %d entries\n",
                 (int)CONTAINER_SIZE(container)));
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to