]> git.pld-linux.org Git - packages/net-snmp.git/commitdiff
- take only AF_INET sockets (as that what /proc/net/tcp contains)
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 10 Mar 2009 20:56:04 +0000 (20:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    net-snmp-netlink.patch -> 1.9

net-snmp-netlink.patch

index 20cfb4b9981c94aa1e6f8842fcb071730806ec73..bf85ed965de60baaa5e24e3f8095b9cd01cd51b6 100644 (file)
@@ -46,8 +46,8 @@
  PERLLDOPTS_FOR_APPS = @PERLLDOPTS_FOR_APPS@
  PERLLDOPTS_FOR_LIBS = @PERLLDOPTS_FOR_LIBS@
  LIBS          = $(USELIBS) @AGENTLIBS@ $(PERLLDOPTS_FOR_APPS)
---- net-snmp-5.4.2.1-nl/agent/mibgroup/mibII/tcpTable.c        2009-03-10 02:28:04.794084959 +0200
-+++ net-snmp-5.4.2.1-nl/agent/mibgroup/mibII/tcpTable.c        2009-03-10 21:53:36.453773342 +0200
+--- net-snmp-5.4.2.1-nl/agent/mibgroup/mibII/tcpTable.c        2009-03-10 21:53:36.453773342 +0200
++++ net-snmp-5.4.2.1-nl/agent/mibgroup/mibII/tcpTable.c        2009-03-10 22:49:50.326352782 +0200
 @@ -29,6 +29,11 @@
  #if HAVE_NETINET_TCP_VAR_H
  #include <netinet/tcp_var.h>
@@ -60,7 +60,7 @@
  
  #include <net-snmp/net-snmp-includes.h>
  #include <net-snmp/agent/net-snmp-agent-includes.h>
-@@ -543,6 +548,106 @@
+@@ -543,6 +548,112 @@
  #else                           /* hpux11 */
  
  #ifdef linux
 +                      }
 +
 +                      struct inet_diag_msg *r = nlmsg_data(h);
++
++                      if (r->idiag_family != AF_INET) {
++                              h = nlmsg_next(h, &len);
++                              continue;
++                      }
++
 +                      struct inpcb    pcb, *nnew;
 +                      static int      linux_states[12] =
 +                              { 1, 5, 3, 4, 6, 7, 11, 1, 8, 9, 2, 10 };
  int
  tcpTable_load(netsnmp_cache *cache, void *vmagic)
  {
-@@ -551,6 +656,10 @@
+@@ -551,6 +662,10 @@
  
      tcpTable_free(cache, NULL);
  
This page took 0.031557 seconds and 4 git commands to generate.