Marcel Telka
2024-02-13 8ed4254a9c497388f52452371d0d7f4b025ed11c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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/
 
--- net-snmp-5.9.4/agent/mibgroup/kernel_sunos5.c.orig
+++ net-snmp-5.9.4/agent/mibgroup/kernel_sunos5.c
@@ -1739,8 +1739,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);
 #ifdef IFF_FAILED
         } else if (flags & IFF_FAILED) {
             /*