components/net-snmp/patches/055.20461627.17502158.kernel_sunos5.patch
branchs11u3-sru
changeset 5133 19d9e2477ac2
equal deleted inserted replaced
5132:048ccb1a7e2c 5133:19d9e2477ac2
       
     1 This patch fixes a Solaris specific issue where ifoperstatus of
       
     2 the vnic's inside a non global zone and also ifoperstatus of
       
     3 the vlan shows it as down even though the link is up. The patch 
       
     4 has been submitted to the community but has not been accepted yet.
       
     5 
       
     6 The details can be found in the following location
       
     7 https://sourceforge.net/p/net-snmp/bugs/2605/
       
     8 
       
     9 --- a/agent/mibgroup/kernel_sunos5.c	Thu Apr 16 21:13:47 2015
       
    10 +++ b/agent/mibgroup/kernel_sunos5.c	Thu Apr 16 21:18:28 2015
       
    11 @@ -1922,8 +1922,8 @@
       
    12      if (ifp->ifAdminStatus == 1) {
       
    13          int i_tmp;
       
    14          /* only UPed interfaces get correct link status - if any */
       
    15 -        if (getKstatInt(NULL, name,"link_up",&i_tmp) == 0) {
       
    16 -            ifp->ifOperStatus = i_tmp ? 1 : 2;
       
    17 +        if (getKstatInt("link", name,"phys_state",&i_tmp) == 0) {
       
    18 +            ifp->ifOperStatus = (i_tmp == 1) ? 1 : ((i_tmp == 0) ? 2 : 4);
       
    19          } else if(link_to_phydev(name, phydevname) == 0) {
       
    20                   strcpy(devbasename, phydevname);
       
    21                   DEBUGMSGTL(("kernel_sunos5","phydevname = %s\n", phydevname));