components/net-snmp/patches/060.20461627.17502158.kernel_sunos5.patch
author Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
Tue, 08 Dec 2015 14:36:41 -0800
changeset 5171 4e8b3c0ea78c
parent 4789 4f6fec688e48
permissions -rw-r--r--
22307393 Upgrade OpenSSL version to 1.0.2e 22307570 problem in LIBRARY/OPENSSL 22307591 problem in LIBRARY/OPENSSL 22307596 problem in LIBRARY/OPENSSL 22307601 problem in LIBRARY/OPENSSL 22317607 problem in LIBRARY/OPENSSL

This patch fixes a Solaris specific issue where ifoperstatus of
the vnic's inside a non global zone and also ifoperstatus of
the vlan shows it as down even though the link is up. The patch 
has been submitted to the community but has not been accepted yet.

The details can be found in the following location
https://sourceforge.net/p/net-snmp/bugs/2605/

--- a/agent/mibgroup/kernel_sunos5.c	Thu Apr 16 21:13:47 2015
+++ b/agent/mibgroup/kernel_sunos5.c	Thu Apr 16 21:18:28 2015
@@ -1922,8 +1922,8 @@
     if (ifp->ifAdminStatus == 1) {
         int i_tmp;
         /* only UPed interfaces get correct link status - if any */
-        if (getKstatInt(NULL, name,"link_up",&i_tmp) == 0) {
-            ifp->ifOperStatus = i_tmp ? 1 : 2;
+        if (getKstatInt("link", name,"phys_state",&i_tmp) == 0) {
+            ifp->ifOperStatus = (i_tmp == 1) ? 1 : ((i_tmp == 0) ? 2 : 4);
         } else if(link_to_phydev(name, phydevname) == 0) {
                  strcpy(devbasename, phydevname);
                  DEBUGMSGTL(("kernel_sunos5","phydevname = %s\n", phydevname));