components/net-snmp/patches/057.23060345.patch
author pkidd <patrick.kidd@oracle.com>
Tue, 21 Feb 2017 09:42:20 -0800
branchs11u3-sru
changeset 7677 9b4f5d1632d7
parent 6569 8f8707138007
permissions -rw-r--r--
Added tag 0.175.3.18.0.2.0, S11.3SRU18.2 for changeset 89cc78d134da
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6569
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
     1
The patch has been taken from community and fixes skipNFSInHostResources handling of hrStorageTable.
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
     2
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
     3
The details can be found in the following location
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
     4
https://sourceforge.net/p/net-snmp/code/ci/94ef3205ac323f6d11ee6b3317484e4eda746c3a/
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
     5
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
     6
--- net-snmp-5.4.1/agent/mibgroup/host/hr_storage.c	2016-03-23 04:42:08.681623040 -0700
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
     7
+++ copy_net-snmp-5.4.1/agent/mibgroup/host/hr_storage.c	2016-03-23 05:11:17.386789330 -0700
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
     8
@@ -524,12 +524,11 @@
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
     9
 	    return NULL;
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    10
 
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    11
         store_idx = name[ HRSTORE_ENTRY_NAME_LENGTH ];
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    12
-        if (HRFS_entry &&
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    13
-            netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    14
-                                   NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) &&
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    15
-            Check_HR_FileSys_NFS())
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    16
-            return NULL;
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    17
         if (store_idx > NETSNMP_MEM_TYPE_MAX ) {
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    18
+	    if ( netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    19
+                                        NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES) &&
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    20
+                 			Check_HR_FileSys_NFS())
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    21
+               	return NULL;  /* or goto try_next; */
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    22
 	    if (HRFS_statfs(HRFS_entry->HRFS_mount, &stat_buf) < 0) {
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    23
 		snmp_log_perror(HRFS_entry->HRFS_mount);
8f8707138007 23060345 Query of hrStorageDescr fails with skipNFSInHostResources set to true
Vishwas Shekarappa Gudiyavar <vishwas.shekarappa.gudiyavar@oracle.com>
parents:
diff changeset
    24
 		goto try_next;