components/net-snmp/patches/026.7186501.cpu_kstat.patch
author Ronald Jordan <ron.jordan@oracle.com>
Tue, 11 Oct 2016 11:55:12 -0700
branchs11u3-sru
changeset 7085 cad8ee01213d
parent 2362 48abcd3091c2
permissions -rw-r--r--
23206271 Upgrade cffi to 1.5.2 22871503 Upgrade cryptography to version 1.2.3 22520335 Integrate idna into Userland 22520346 Integrate ipaddress into Userland

--- net-snmp-5.4.1/agent/mibgroup/hardware/cpu/cpu_kstat.c	Thu Oct  5 08:53:42 2006
+++ net-snmp-5.4.1.mod/agent/mibgroup/hardware/cpu/cpu_kstat.c	Thu Mar 29 07:57:19 2012
@@ -103,6 +103,8 @@
         if (strcmp(ksp->ks_module, "cpu_stat") == 0) {
             i    = ksp->ks_instance;
             cpu2 = netsnmp_cpu_get_byIdx( i, 0 );
+            if ( !cpu2 )
+                    break;  /* or continue ?*/ /*Skip new CPUs */
             if ((ksp->ks_type != KSTAT_TYPE_RAW) ||
                 (ksp->ks_data_size != sizeof(cs))||
                 (kstat_read(kstat_fd, ksp, &cs) == -1)) {