23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
authorVishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
Tue, 19 Apr 2016 21:30:19 -0700
changeset 5813 5592d099c9c8
parent 5811 c8a3c3d0ed1f
child 5814 40b5cf15fafc
23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
components/net-snmp/patches/063.23060345.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/net-snmp/patches/063.23060345.patch	Tue Apr 19 21:30:19 2016 -0700
@@ -0,0 +1,24 @@
+The patch has been taken from community and fixes skipNFSInHostResources handling of hrStorageTable.
+
+The details can be found in the following location
+https://sourceforge.net/p/net-snmp/code/ci/94ef3205ac323f6d11ee6b3317484e4eda746c3a/
+
+--- net-snmp-5.4.1/agent/mibgroup/host/hr_storage.c	2016-03-23 04:42:08.681623040 -0700
++++ copy_net-snmp-5.4.1/agent/mibgroup/host/hr_storage.c	2016-03-23 05:11:17.386789330 -0700
+@@ -524,12 +524,11 @@
+ 	    return NULL;
+ 
+         store_idx = name[ HRSTORE_ENTRY_NAME_LENGTH ];
+-        if (HRFS_entry &&
+-            netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
+-                                   NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) &&
+-            Check_HR_FileSys_NFS())
+-            return NULL;
+         if (store_idx > NETSNMP_MEM_TYPE_MAX ) {
++	    if ( netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
++                                        NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) &&
++                 			Check_HR_FileSys_NFS())
++               	return NULL;  /* or goto try_next; */
+ 	    if (HRFS_statfs(HRFS_entry->HRFS_mount, &stat_buf) < 0) {
+ 		snmp_log_perror(HRFS_entry->HRFS_mount);
+ 		goto try_next;