SF.net SVN: gar:[24703] csw/mgar/pkg/netsnmp/trunk

hjb001 at users.sourceforge.net hjb001 at users.sourceforge.net
Tue Mar 3 11:06:23 CET 2015


Revision: 24703
          http://sourceforge.net/p/gar/code/24703
Author:   hjb001
Date:     2015-03-03 10:06:22 +0000 (Tue, 03 Mar 2015)
Log Message:
-----------
Upgraded for upstream version 5.7.3 (LTS)

Modified Paths:
--------------
    csw/mgar/pkg/netsnmp/trunk/Makefile
    csw/mgar/pkg/netsnmp/trunk/checksums
    csw/mgar/pkg/netsnmp/trunk/files/0004-enable-python-version-select.patch
    csw/mgar/pkg/netsnmp/trunk/files/0015+0016-vmstat_solaris2.patch
    csw/mgar/pkg/netsnmp/trunk/files/0024-kernel_sunos5.5.10.patch
    csw/mgar/pkg/netsnmp/trunk/files/0024-kernel_sunos5.5.11.patch
    csw/mgar/pkg/netsnmp/trunk/files/0052-dyn-cpu-cpu_kstat.patch
    csw/mgar/pkg/netsnmp/trunk/files/Makefile.in.diff

Modified: csw/mgar/pkg/netsnmp/trunk/Makefile
===================================================================
--- csw/mgar/pkg/netsnmp/trunk/Makefile	2015-03-02 19:24:13 UTC (rev 24702)
+++ csw/mgar/pkg/netsnmp/trunk/Makefile	2015-03-03 10:06:22 UTC (rev 24703)
@@ -5,7 +5,7 @@
 #
 
 NAME = netsnmp
-VERSION = 5.7.2
+VERSION = 5.7.3
 GARTYPE = v2
 
 DESCRIPTION = A suite of applications used to implement SNMP
@@ -43,10 +43,12 @@
 PATCHFILES += 0012-Makefile.PL.patch
 PATCHFILES += 0015+0016-vmstat_solaris2.patch
 PATCHFILES += 0024-kernel_sunos5.$(GAROSREL).patch
-PATCHFILES += 0034-manpage-snmptrapd.conf.5.def.patch
+# this manpage patch is suspect - upstream has changed the same section in 5.7.3 in a different way
+# PATCHFILES += 0034-manpage-snmptrapd.conf.5.def.patch
 PATCHFILES += 0035-bug-1849903.patch
 PATCHFILES += 0048+0027-mnt-cache-hr_filesys.patch
-PATCHFILES += 0051-CVE-2014-2285.patch
+# this CVE is already fixed in 5.7.3
+# PATCHFILES += 0051-CVE-2014-2285.patch
 PATCHFILES += 0052-dyn-cpu-cpu_kstat.patch
 
 VENDOR_URL = http://www.net-snmp.org/

Modified: csw/mgar/pkg/netsnmp/trunk/checksums
===================================================================
--- csw/mgar/pkg/netsnmp/trunk/checksums	2015-03-02 19:24:13 UTC (rev 24702)
+++ csw/mgar/pkg/netsnmp/trunk/checksums	2015-03-03 10:06:22 UTC (rev 24703)
@@ -1 +1 @@
-5bddd02e2f82b62daa79f82717737a14  net-snmp-5.7.2.tar.gz
+d4a3459e1577d0efa8d96ca70a885e53  net-snmp-5.7.3.tar.gz

Modified: csw/mgar/pkg/netsnmp/trunk/files/0004-enable-python-version-select.patch
===================================================================
--- csw/mgar/pkg/netsnmp/trunk/files/0004-enable-python-version-select.patch	2015-03-02 19:24:13 UTC (rev 24702)
+++ csw/mgar/pkg/netsnmp/trunk/files/0004-enable-python-version-select.patch	2015-03-03 10:06:22 UTC (rev 24703)
@@ -7,5 +7,5 @@
 -PYTHON          = @PYTHONPROG@
 +PYTHON          ?= @PYTHONPROG@
  FIND            = @FIND@
+ EGREP           = @EGREP@
  
- #

Modified: csw/mgar/pkg/netsnmp/trunk/files/0015+0016-vmstat_solaris2.patch
===================================================================
--- csw/mgar/pkg/netsnmp/trunk/files/0015+0016-vmstat_solaris2.patch	2015-03-02 19:24:13 UTC (rev 24702)
+++ csw/mgar/pkg/netsnmp/trunk/files/0015+0016-vmstat_solaris2.patch	2015-03-03 10:06:22 UTC (rev 24703)
@@ -8,8 +8,6 @@
          /*
           * Now calculate the absolute percentage values 
           * Looks somewhat complicated sometimes but tries to get around using floats to increase speed 
---- a/agent/mibgroup/ucd-snmp/vmstat_solaris2.c
-+++ b/agent/mibgroup/ucd-snmp/vmstat_solaris2.c
 @@ -703,7 +704,12 @@ var_extensible_vmstat(struct variable *vp,
      case CPUIDLE:
          return ((u_char *) (&cpu_perc[CPU_IDLE]));

Modified: csw/mgar/pkg/netsnmp/trunk/files/0024-kernel_sunos5.5.10.patch
===================================================================
--- csw/mgar/pkg/netsnmp/trunk/files/0024-kernel_sunos5.5.10.patch	2015-03-02 19:24:13 UTC (rev 24702)
+++ csw/mgar/pkg/netsnmp/trunk/files/0024-kernel_sunos5.5.10.patch	2015-03-03 10:06:22 UTC (rev 24703)
@@ -20,7 +20,7 @@
       300, 0, 0},
      {MIB_ICMP, sizeof(mib2_icmp_t), (void *) -1, 0, 60, 0, 0},
      {MIB_TCP, sizeof(mib2_tcp_t), (void *) -1, 0, 60, 0, 0},
-@@ -105,13 +105,13 @@ mibcache        Mibcache[MIBCACHE_SIZE+1] = {
+@@ -105,13 +105,13 @@ mibcache        Mibcache[MIBCACHE_SIZE+1
      {MIB_SNMP, 0, (void *) -1, 0, 0, 0, 0},
  #ifdef SOLARIS_HAVE_IPV6_MIB_SUPPORT
  #ifdef SOLARIS_HAVE_RFC4293_SUPPORT
@@ -35,10 +35,10 @@
  #endif
 -    {MIB_IP6_ADDR, 20 * sizeof(mib2_ipv6AddrEntry_t), (void *)-1, 0, 30, 0, 0},
 +    {MIB_IP6_ADDR, 128 * sizeof(mib2_ipv6AddrEntry_t), (void *)-1, 0, 30, 0, 0},
+     {MIB_IP6_ROUTE, 200 * sizeof(mib2_ipv6AddrEntry_t), (void *)-1, 0, 30, 0, 0},
+     {MIB_ICMP6, 20 * sizeof(mib2_ipv6IfIcmpEntry_t), (void *)-1, 0, 30, 0, 0},
      {MIB_TCP6_CONN, 1000 * sizeof(mib2_tcp6ConnEntry_t), (void *) -1, 0, 30,
-      0, 0},
-     {MIB_UDP6_ENDPOINT, 1000 * sizeof(mib2_udp6Entry_t), (void *) -1, 0, 30,
-@@ -184,7 +184,7 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type, mib2_ifEntry_t *resp,
+@@ -188,7 +188,7 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
        size_t *length, int (*comp)(void *, void *), void *arg);
  static void 
  set_if_info(mib2_ifEntry_t *ifp, unsigned index, char *name, uint64_t flags,
@@ -47,7 +47,7 @@
  static int get_if_stats(mib2_ifEntry_t *ifp);
  
  #if defined(HAVE_IF_NAMEINDEX) && defined(NETSNMP_INCLUDE_IFTABLE_REWRITES)
-@@ -294,7 +294,9 @@ getKstatInt(const char *classname, const char *statname,
+@@ -298,7 +298,9 @@ getKstatInt(const char *classname, const
      kstat_t        *ks;
      kid_t           kid;
      kstat_named_t  *named;
@@ -57,7 +57,7 @@
  
      if (kstat_fd == 0) {
  	kstat_fd = kstat_open();
-@@ -305,27 +307,88 @@ getKstatInt(const char *classname, const char *statname,
+@@ -309,27 +311,88 @@ getKstatInt(const char *classname, const
      if ((ksc = kstat_fd) == NULL) {
  	goto Return;
      }
@@ -166,7 +166,7 @@
      ret = 0;                /* maybe successful */
      switch (named->data_type) {
  #ifdef KSTAT_DATA_INT32         /* Solaris 2.6 and up */
-@@ -442,11 +505,20 @@ getKstat(const char *statname, const char *varname, void *value)
+@@ -446,11 +509,20 @@ getKstat(const char *statname, const cha
      /*
       * Get the named statistics 
       */
@@ -191,7 +191,7 @@
      if (kstat_read(ksc, ks, NULL) <= 0) {
  	ret = -10;
  	goto Return;        /* kstat errors */
-@@ -1080,18 +1152,21 @@ getmib(int groupname, int subgroupname, void **statbuf, size_t *size,
+@@ -1088,18 +1160,21 @@ getmib(int groupname, int subgroupname,
  static int
  _dlpi_open(const char *devname)
  {
@@ -218,7 +218,7 @@
      DEBUGMSGTL(("kernel_sunos5:dlpi", "devstr(%s)\n", devstr));
      /*
       * First try opening the device using style 1, if the device does not
-@@ -1102,13 +1177,49 @@ _dlpi_open(const char *devname)
+@@ -1110,13 +1185,49 @@ _dlpi_open(const char *devname)
      DEBUGMSGTL(("kernel_sunos5:dlpi", "style1 open(%s)\n", devstr));
      if ((fd = open(devstr, O_RDWR | O_NONBLOCK)) < 0) {
          DEBUGMSGTL(("kernel_sunos5:dlpi", "style1 open failed\n"));
@@ -236,7 +236,8 @@
 +     *  is required
 +     */
 +    ret = strlcpy(devstrcpy, devstr, sizeof(devstrcpy));
-+
+ 
+-            if ((fd = open(devstr, O_RDWR | O_NONBLOCK)) != -1) {
 +    if(ret > sizeof(devstrcpy) - 1)
 +        return -1;
 +
@@ -252,8 +253,7 @@
 +      DEBUGMSGTL(("kernel_sunos5:dlpi", "devstr(%s)\n", devstr));
 +      
 +      /* try style 2 */
- 
--            if ((fd = open(devstr, O_RDWR | O_NONBLOCK)) != -1) {
++
 +     if ((fd = open(devstr, O_RDWR | O_NONBLOCK)) < 0) {
 +        DEBUGMSGTL(("kernel_sunos5:dlpi", "style2 open failed\n"));
 +	fd = -1;
@@ -274,7 +274,7 @@
                  if (_dlpi_attach(fd, ppa) == 0) {
                      DEBUGMSGTL(("kernel_sunos5:dlpi", "attached\n"));
                  } else {
-@@ -1117,16 +1228,11 @@ _dlpi_open(const char *devname)
+@@ -1125,16 +1236,11 @@ _dlpi_open(const char *devname)
                      fd = -1;
                  }
              } else {
@@ -292,7 +292,7 @@
      return (fd);
  }
  
-@@ -1141,7 +1247,9 @@ _dlpi_get_phys_address(int fd, char *addr, int maxlen, int *addrlen)
+@@ -1149,7 +1255,9 @@ _dlpi_get_phys_address(int fd, char *add
      struct strbuf       ctlbuf;
      char                buf[MAX(DL_PHYS_ADDR_ACK_SIZE+64, DL_ERROR_ACK_SIZE)];
      int                 flag = 0;
@@ -303,7 +303,7 @@
      DEBUGMSGTL(("kernel_sunos5:dlpi", "_dlpi_get_phys_address\n"));
  
      paddr_req.dl_primitive = DL_PHYS_ADDR_REQ;
-@@ -1154,7 +1262,22 @@ _dlpi_get_phys_address(int fd, char *addr, int maxlen, int *addrlen)
+@@ -1162,7 +1270,22 @@ _dlpi_get_phys_address(int fd, char *add
      ctlbuf.maxlen = sizeof(buf);
      ctlbuf.len = 0;
      ctlbuf.buf = buf;
@@ -327,7 +327,7 @@
          return (-1);
  
      if (ctlbuf.len < sizeof(uint32_t))
-@@ -1196,6 +1319,8 @@ _dlpi_get_iftype(int fd, unsigned int *iftype)
+@@ -1204,6 +1327,8 @@ _dlpi_get_iftype(int fd, unsigned int *i
      struct strbuf       ctlbuf;
      char                buf[MAX(DL_INFO_ACK_SIZE, DL_ERROR_ACK_SIZE)];
      int                 flag = 0;
@@ -336,7 +336,7 @@
  
      DEBUGMSGTL(("kernel_sunos5:dlpi", "_dlpi_get_iftype\n"));
  
-@@ -1210,7 +1335,22 @@ _dlpi_get_iftype(int fd, unsigned int *iftype)
+@@ -1218,7 +1343,22 @@ _dlpi_get_iftype(int fd, unsigned int *i
      ctlbuf.maxlen = sizeof(buf);
      ctlbuf.len = 0;
      ctlbuf.buf = buf;
@@ -360,7 +360,7 @@
          DEBUGMSGTL(("kernel_sunos5:dlpi", "getmsg failed: %d\n", errno));
          return (-1);
      }
-@@ -1367,8 +1507,9 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type,
+@@ -1375,8 +1515,9 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
      mib2_ifEntry_t *ifp;
      int             nentries = size / sizeof(mib2_ifEntry_t);
      found_e         result = NOT_FOUND;
@@ -371,7 +371,7 @@
      struct if_nameindex *ifname, *ifnp;
  
      lifrp = &lifreq; 
-@@ -1400,6 +1541,7 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type,
+@@ -1408,6 +1549,7 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
          memcpy(lifrp->lifr_name, ifnp->if_name, LIFNAMSIZ);
          if_isv6 = B_FALSE;
  
@@ -379,7 +379,7 @@
          if (ioctl(ifsd, SIOCGLIFFLAGS, lifrp) < 0) {
              if (ifsd6 == -1) {
                  if ((ifsd6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
-@@ -1408,17 +1550,19 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type,
+@@ -1416,17 +1558,19 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
                  }
              }
              if (ioctl(ifsd6, SIOCGLIFFLAGS, lifrp) < 0) {
@@ -403,7 +403,7 @@
          }
  
          memset(ifp, 0, sizeof(mib2_ifEntry_t));
-@@ -1433,11 +1577,12 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type,
+@@ -1441,11 +1585,12 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
          }
  
          set_if_info(ifp, ifnp->if_index, ifnp->if_name, if_flags, 
@@ -418,7 +418,7 @@
          }
  
          /*
-@@ -1614,11 +1759,109 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type,
+@@ -1622,11 +1767,109 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
  }
  #endif /*defined(HAVE_IF_NAMEINDEX)&&defined(NETSNMP_INCLUDE_IFTABLE_REWRITES)*/
  
@@ -529,7 +529,7 @@
  
      /*
       * Set basic information 
-@@ -1627,7 +1870,10 @@ set_if_info(mib2_ifEntry_t *ifp, unsigned index, char *name, uint64_t flags,
+@@ -1635,7 +1878,10 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
      ifp->ifDescr.o_length = strlen(name);
      strcpy(ifp->ifDescr.o_bytes, name);
      ifp->ifAdminStatus = (flags & IFF_UP) ? 1 : 2;
@@ -541,7 +541,7 @@
      ifp->ifLastChange = 0;      /* Who knows ...  */
      ifp->flags = flags;
      ifp->ifMtu = mtu;
-@@ -1644,7 +1890,8 @@ set_if_info(mib2_ifEntry_t *ifp, unsigned index, char *name, uint64_t flags,
+@@ -1652,7 +1898,8 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
              ifp->ifSpeed *= 1000000;
          }
  	havespeed = B_TRUE;

Modified: csw/mgar/pkg/netsnmp/trunk/files/0024-kernel_sunos5.5.11.patch
===================================================================
--- csw/mgar/pkg/netsnmp/trunk/files/0024-kernel_sunos5.5.11.patch	2015-03-02 19:24:13 UTC (rev 24702)
+++ csw/mgar/pkg/netsnmp/trunk/files/0024-kernel_sunos5.5.11.patch	2015-03-03 10:06:22 UTC (rev 24703)
@@ -29,7 +29,7 @@
       300, 0, 0},
      {MIB_ICMP, sizeof(mib2_icmp_t), (void *) -1, 0, 60, 0, 0},
      {MIB_TCP, sizeof(mib2_tcp_t), (void *) -1, 0, 60, 0, 0},
-@@ -105,13 +107,13 @@ mibcache        Mibcache[MIBCACHE_SIZE+1] = {
+@@ -105,13 +107,13 @@ mibcache        Mibcache[MIBCACHE_SIZE+1
      {MIB_SNMP, 0, (void *) -1, 0, 0, 0, 0},
  #ifdef SOLARIS_HAVE_IPV6_MIB_SUPPORT
  #ifdef SOLARIS_HAVE_RFC4293_SUPPORT
@@ -44,10 +44,10 @@
  #endif
 -    {MIB_IP6_ADDR, 20 * sizeof(mib2_ipv6AddrEntry_t), (void *)-1, 0, 30, 0, 0},
 +    {MIB_IP6_ADDR, 128 * sizeof(mib2_ipv6AddrEntry_t), (void *)-1, 0, 30, 0, 0},
+     {MIB_IP6_ROUTE, 200 * sizeof(mib2_ipv6AddrEntry_t), (void *)-1, 0, 30, 0, 0},
+     {MIB_ICMP6, 20 * sizeof(mib2_ipv6IfIcmpEntry_t), (void *)-1, 0, 30, 0, 0},
      {MIB_TCP6_CONN, 1000 * sizeof(mib2_tcp6ConnEntry_t), (void *) -1, 0, 30,
-      0, 0},
-     {MIB_UDP6_ENDPOINT, 1000 * sizeof(mib2_udp6Entry_t), (void *) -1, 0, 30,
-@@ -184,9 +186,9 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type, mib2_ifEntry_t *resp,
+@@ -188,9 +190,9 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
        size_t *length, int (*comp)(void *, void *), void *arg);
  static void 
  set_if_info(mib2_ifEntry_t *ifp, unsigned index, char *name, uint64_t flags,
@@ -59,7 +59,7 @@
  #if defined(HAVE_IF_NAMEINDEX) && defined(NETSNMP_INCLUDE_IFTABLE_REWRITES)
  static int _dlpi_open(const char *devname);
  static int _dlpi_get_phys_address(int fd, char *paddr, int maxlen,
-@@ -294,7 +296,9 @@ getKstatInt(const char *classname, const char *statname,
+@@ -298,7 +300,9 @@ getKstatInt(const char *classname, const
      kstat_t        *ks;
      kid_t           kid;
      kstat_named_t  *named;
@@ -69,7 +69,7 @@
  
      if (kstat_fd == 0) {
  	kstat_fd = kstat_open();
-@@ -305,27 +309,88 @@ getKstatInt(const char *classname, const char *statname,
+@@ -309,27 +313,88 @@ getKstatInt(const char *classname, const
      if ((ksc = kstat_fd) == NULL) {
  	goto Return;
      }
@@ -178,7 +178,7 @@
      ret = 0;                /* maybe successful */
      switch (named->data_type) {
  #ifdef KSTAT_DATA_INT32         /* Solaris 2.6 and up */
-@@ -442,11 +507,20 @@ getKstat(const char *statname, const char *varname, void *value)
+@@ -446,11 +511,20 @@ getKstat(const char *statname, const cha
      /*
       * Get the named statistics 
       */
@@ -203,7 +203,7 @@
      if (kstat_read(ksc, ks, NULL) <= 0) {
  	ret = -10;
  	goto Return;        /* kstat errors */
-@@ -1080,18 +1154,21 @@ getmib(int groupname, int subgroupname, void **statbuf, size_t *size,
+@@ -1088,18 +1162,21 @@ getmib(int groupname, int subgroupname,
  static int
  _dlpi_open(const char *devname)
  {
@@ -230,7 +230,7 @@
      DEBUGMSGTL(("kernel_sunos5:dlpi", "devstr(%s)\n", devstr));
      /*
       * First try opening the device using style 1, if the device does not
-@@ -1102,13 +1179,49 @@ _dlpi_open(const char *devname)
+@@ -1110,13 +1187,49 @@ _dlpi_open(const char *devname)
      DEBUGMSGTL(("kernel_sunos5:dlpi", "style1 open(%s)\n", devstr));
      if ((fd = open(devstr, O_RDWR | O_NONBLOCK)) < 0) {
          DEBUGMSGTL(("kernel_sunos5:dlpi", "style1 open failed\n"));
@@ -286,7 +286,7 @@
                  if (_dlpi_attach(fd, ppa) == 0) {
                      DEBUGMSGTL(("kernel_sunos5:dlpi", "attached\n"));
                  } else {
-@@ -1117,16 +1230,11 @@ _dlpi_open(const char *devname)
+@@ -1125,16 +1238,11 @@ _dlpi_open(const char *devname)
                      fd = -1;
                  }
              } else {
@@ -304,7 +304,7 @@
      return (fd);
  }
  
-@@ -1141,7 +1249,9 @@ _dlpi_get_phys_address(int fd, char *addr, int maxlen, int *addrlen)
+@@ -1149,7 +1257,9 @@ _dlpi_get_phys_address(int fd, char *add
      struct strbuf       ctlbuf;
      char                buf[MAX(DL_PHYS_ADDR_ACK_SIZE+64, DL_ERROR_ACK_SIZE)];
      int                 flag = 0;
@@ -315,7 +315,7 @@
      DEBUGMSGTL(("kernel_sunos5:dlpi", "_dlpi_get_phys_address\n"));
  
      paddr_req.dl_primitive = DL_PHYS_ADDR_REQ;
-@@ -1154,7 +1264,22 @@ _dlpi_get_phys_address(int fd, char *addr, int maxlen, int *addrlen)
+@@ -1162,7 +1272,22 @@ _dlpi_get_phys_address(int fd, char *add
      ctlbuf.maxlen = sizeof(buf);
      ctlbuf.len = 0;
      ctlbuf.buf = buf;
@@ -339,7 +339,7 @@
          return (-1);
  
      if (ctlbuf.len < sizeof(uint32_t))
-@@ -1196,6 +1321,8 @@ _dlpi_get_iftype(int fd, unsigned int *iftype)
+@@ -1204,6 +1329,8 @@ _dlpi_get_iftype(int fd, unsigned int *i
      struct strbuf       ctlbuf;
      char                buf[MAX(DL_INFO_ACK_SIZE, DL_ERROR_ACK_SIZE)];
      int                 flag = 0;
@@ -348,7 +348,7 @@
  
      DEBUGMSGTL(("kernel_sunos5:dlpi", "_dlpi_get_iftype\n"));
  
-@@ -1210,7 +1337,22 @@ _dlpi_get_iftype(int fd, unsigned int *iftype)
+@@ -1218,7 +1345,22 @@ _dlpi_get_iftype(int fd, unsigned int *i
      ctlbuf.maxlen = sizeof(buf);
      ctlbuf.len = 0;
      ctlbuf.buf = buf;
@@ -372,7 +372,7 @@
          DEBUGMSGTL(("kernel_sunos5:dlpi", "getmsg failed: %d\n", errno));
          return (-1);
      }
-@@ -1367,8 +1509,9 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type,
+@@ -1375,8 +1517,9 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
      mib2_ifEntry_t *ifp;
      int             nentries = size / sizeof(mib2_ifEntry_t);
      found_e         result = NOT_FOUND;
@@ -383,7 +383,7 @@
      struct if_nameindex *ifname, *ifnp;
  
      lifrp = &lifreq; 
-@@ -1400,6 +1543,7 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type,
+@@ -1408,6 +1551,7 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
          memcpy(lifrp->lifr_name, ifnp->if_name, LIFNAMSIZ);
          if_isv6 = B_FALSE;
  
@@ -391,7 +391,7 @@
          if (ioctl(ifsd, SIOCGLIFFLAGS, lifrp) < 0) {
              if (ifsd6 == -1) {
                  if ((ifsd6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
-@@ -1408,17 +1552,19 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type,
+@@ -1416,17 +1560,19 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
                  }
              }
              if (ioctl(ifsd6, SIOCGLIFFLAGS, lifrp) < 0) {
@@ -415,7 +415,7 @@
          }
  
          memset(ifp, 0, sizeof(mib2_ifEntry_t));
-@@ -1433,11 +1579,12 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type,
+@@ -1441,11 +1587,12 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
          }
  
          set_if_info(ifp, ifnp->if_index, ifnp->if_name, if_flags, 
@@ -430,7 +430,7 @@
          }
  
          /*
-@@ -1614,11 +1761,155 @@ getif(mib2_ifEntry_t *ifbuf, size_t size, req_e req_type,
+@@ -1622,11 +1769,155 @@ getif(mib2_ifEntry_t *ifbuf, size_t size
  }
  #endif /*defined(HAVE_IF_NAMEINDEX)&&defined(NETSNMP_INCLUDE_IFTABLE_REWRITES)*/
  
@@ -587,7 +587,7 @@
  
      /*
       * Set basic information 
-@@ -1627,7 +1918,10 @@ set_if_info(mib2_ifEntry_t *ifp, unsigned index, char *name, uint64_t flags,
+@@ -1635,7 +1926,10 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
      ifp->ifDescr.o_length = strlen(name);
      strcpy(ifp->ifDescr.o_bytes, name);
      ifp->ifAdminStatus = (flags & IFF_UP) ? 1 : 2;
@@ -599,18 +599,19 @@
      ifp->ifLastChange = 0;      /* Who knows ...  */
      ifp->flags = flags;
      ifp->ifMtu = mtu;
-@@ -1649,14 +1943,26 @@ set_if_info(mib2_ifEntry_t *ifp, unsigned index, char *name, uint64_t flags,
+@@ -1657,8 +1951,9 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
           * this is good 
           */
  	havespeed = B_TRUE;
+-    } else if (getKstatInt("link", name, "ifspeed", &ifp->ifSpeed) == 0) {
+-	havespeed = B_TRUE;
 +    } else if ((getKstatInt("link", name, "ifspeed", &ifp->ifSpeed) == 0) ||
 +               (getKstatInt("link", name, "ifSpeed", &ifp->ifSpeed) == 0)) {
 +        havespeed = B_TRUE;
      }
--
+ 
      /* make ifOperStatus depend on link status if available */
-     if (ifp->ifAdminStatus == 1) {
-         int i_tmp;
+@@ -1667,6 +1962,16 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
          /* only UPed interfaces get correct link status - if any */
          if (getKstatInt(NULL, name,"link_up",&i_tmp) == 0) {
              ifp->ifOperStatus = i_tmp ? 1 : 2;

Modified: csw/mgar/pkg/netsnmp/trunk/files/0052-dyn-cpu-cpu_kstat.patch
===================================================================
--- csw/mgar/pkg/netsnmp/trunk/files/0052-dyn-cpu-cpu_kstat.patch	2015-03-02 19:24:13 UTC (rev 24702)
+++ csw/mgar/pkg/netsnmp/trunk/files/0052-dyn-cpu-cpu_kstat.patch	2015-03-03 10:06:22 UTC (rev 24703)
@@ -1,12 +1,13 @@
 --- a/agent/mibgroup/hardware/cpu/cpu_kstat.c
 +++ b/agent/mibgroup/hardware/cpu/cpu_kstat.c
-@@ -17,16 +17,16 @@
+@@ -17,16 +17,18 @@
  extern kstat_ctl_t  *kstat_fd;
  extern int           cpu_num;
  int _cpu_status(char *state);
--
 +static void add_new_kstat_cpu_entry(kstat_t *ksp);
+ 
 +static struct cpu_idx * add_cpu_idx(struct cpu_idx * head, int idx);
++int netsnmp_update_cpu_list( struct cpu_idx * ); /* returns the number of deleted cpus */
 + 
      /*
       * Initialise the list of CPUs on the system
@@ -21,7 +22,7 @@
      netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 1 );
      strcpy(cpu->name, "Overall CPU statistics");
  
-@@ -41,45 +41,61 @@ void init_cpu_kstat( void ) {
+@@ -41,45 +43,61 @@ void init_cpu_kstat( void ) {
          if ((strcmp(ksp->ks_module, "cpu_info") == 0) &&
              (strcmp(ksp->ks_class,  "misc"    ) == 0)) {
              kstat_read(kstat_fd, ksp, NULL );
@@ -57,7 +58,7 @@
  }
  
 +    /*
-+     * adds the new cpu entry to the exisitng list
++     * adds the new cpu entry to the existing list
 +     */
 +static void
 +add_new_kstat_cpu_entry( kstat_t *ksp ) {
@@ -108,7 +109,7 @@
  
          /* Clear overall stats, ready for summing individual CPUs */
      cpu->user_ticks = 0;
-@@ -94,6 +110,32 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
+@@ -94,6 +112,32 @@ int netsnmp_cpu_arch_load( netsnmp_cache
  
      kstat_chain_update( kstat_fd );
      DEBUGMSGTL(("cpu", "cpu_kstat load\n "));
@@ -141,7 +142,7 @@
      for (ksp = kstat_fd->kc_chain; ksp != NULL; ksp = ksp->ks_next) {
          if (ksp->ks_flags & KSTAT_FLAG_INVALID)
              continue;
-@@ -135,9 +177,43 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) {
+@@ -137,9 +181,44 @@ int netsnmp_cpu_arch_load( netsnmp_cache
              cpu->nCtxSwitches += (unsigned long long)cs.cpu_sysinfo.pswitch;
          }
      }
@@ -179,7 +180,8 @@
 +            return head;
 +        }
 +    }
-+
++    DEBUGMSG(("cpu", "(cpu_idx creation failed)\n"));
++    return head; 
 +}
 +
  int
@@ -187,7 +189,7 @@
  {
 --- a/agent/mibgroup/hardware/cpu/cpu.c
 +++ b/agent/mibgroup/hardware/cpu/cpu.c
-@@ -271,4 +271,60 @@ void _cpu_copy_stats( netsnmp_cpu_info *cpu )
+@@ -271,4 +271,60 @@ void _cpu_copy_stats( netsnmp_cpu_info *
      cpu2->pageIn     = cpu->pageIn;
      cpu2->pageOut    = cpu->pageOut;
  }
@@ -248,40 +250,9 @@
 +}
 +
  #endif /* NETSNMP_FEATURE_REMOVE_HARDWARE_CPU_COPY_STATS */
---- a/agent/mibgroup/hardware/cpu/cpu_kstat.c
-+++ b/agent/mibgroup/hardware/cpu/cpu_kstat.c
-@@ -18,7 +18,9 @@ extern kstat_ctl_t  *kstat_fd;
- extern int           cpu_num;
- int _cpu_status(char *state);
- static void add_new_kstat_cpu_entry(kstat_t *ksp);
-+
- static struct cpu_idx * add_cpu_idx(struct cpu_idx * head, int idx);
-+int netsnmp_update_cpu_list( struct cpu_idx * ); /* returns the number of deleted cpus */
-  
-     /*
-      * Initialise the list of CPUs on the system
-@@ -49,7 +51,7 @@ void init_cpu_kstat( void ) {
- }
- 
-     /*
--     * adds the new cpu entry to the exisitng list
-+     * adds the new cpu entry to the existing list
-      */
- static void
- add_new_kstat_cpu_entry( kstat_t *ksp ) {
-@@ -211,7 +213,8 @@ add_cpu_idx(struct cpu_idx * head, int idx)
-             return head;
-         }
-     }
--
-+    DEBUGMSG(("cpu", "(cpu_idx creation failed)\n"));
-+    return head; 
- }
- 
- int
 --- a/include/net-snmp/agent/hardware/cpu.h
 +++ b/include/net-snmp/agent/hardware/cpu.h
-@@ -66,3 +66,11 @@ netsnmp_cpu_info *netsnmp_cpu_get_byName( char*, int );
+@@ -66,3 +66,11 @@ netsnmp_cpu_info *netsnmp_cpu_get_byName
  
  netsnmp_cache *netsnmp_cpu_get_cache( void );
  int netsnmp_cpu_load( void );

Modified: csw/mgar/pkg/netsnmp/trunk/files/Makefile.in.diff
===================================================================
--- csw/mgar/pkg/netsnmp/trunk/files/Makefile.in.diff	2015-03-02 19:24:13 UTC (rev 24702)
+++ csw/mgar/pkg/netsnmp/trunk/files/Makefile.in.diff	2015-03-03 10:06:22 UTC (rev 24703)
@@ -1,6 +1,6 @@
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -198,13 +198,13 @@ perlrealclean:
+@@ -224,13 +224,13 @@ perlcleanfeatures:
  #
  PYMAKE=$(PYTHON) setup.py $(PYTHONARGS)
  pythonmodules: subdirs

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list