components/net-snmp-57/patches/060.20461627.17502158.kernel_sunos5.patch
author Geoffrey Gardella <geoffrey.gardella@oracle.com>
Tue, 03 May 2016 15:56:45 -0700
changeset 5910 93ac80235738
parent 5867 445e2cf1c845
permissions -rw-r--r--
23176903 Update SMF configuration for Puppet 3.8.6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4789
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
     1
This patch fixes a Solaris specific issue where ifoperstatus of
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
     2
the vnic's inside a non global zone and also ifoperstatus of
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
     3
the vlan shows it as down even though the link is up. The patch 
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
     4
has been submitted to the community but has not been accepted yet.
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
     5
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
     6
The details can be found in the following location
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
     7
https://sourceforge.net/p/net-snmp/bugs/2605/
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
     8
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
     9
--- a/agent/mibgroup/kernel_sunos5.c	Thu Apr 16 21:13:47 2015
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    10
+++ b/agent/mibgroup/kernel_sunos5.c	Thu Apr 16 21:18:28 2015
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    11
@@ -1922,8 +1922,8 @@
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    12
     if (ifp->ifAdminStatus == 1) {
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    13
         int i_tmp;
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    14
         /* only UPed interfaces get correct link status - if any */
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    15
-        if (getKstatInt(NULL, name,"link_up",&i_tmp) == 0) {
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    16
-            ifp->ifOperStatus = i_tmp ? 1 : 2;
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    17
+        if (getKstatInt("link", name,"phys_state",&i_tmp) == 0) {
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    18
+            ifp->ifOperStatus = (i_tmp == 1) ? 1 : ((i_tmp == 0) ? 2 : 4);
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    19
         } else if(link_to_phydev(name, phydevname) == 0) {
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    20
                  strcpy(devbasename, phydevname);
4f6fec688e48 20461627 IF-MIB::ifOperStatus is down on vlan interface in guest domain.
Sowrabha H G<sowrabha.hg@oracle.com>
parents:
diff changeset
    21
                  DEBUGMSGTL(("kernel_sunos5","phydevname = %s\n", phydevname));