aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp
diff options
context:
space:
mode:
authorRyan Steinmetz <zi@FreeBSD.org>2012-01-27 15:14:29 +0000
committerRyan Steinmetz <zi@FreeBSD.org>2012-01-27 15:14:29 +0000
commita6d1d9b7494a766a2656710825d4fa165da1a0c7 (patch)
treed451e4dec0004945af7d6c2e560db28212e91342 /net-mgmt/net-snmp
parent2f03ad5dec867ce7b5a4d32d4cfa2415e0223b60 (diff)
downloadports-a6d1d9b7494a766a2656710825d4fa165da1a0c7.tar.gz
ports-a6d1d9b7494a766a2656710825d4fa165da1a0c7.zip
- Merge in fixes for Bug IDs: 3434824 [1], 3419825, 3428506
- Bump PORTREVISION Requested by: Alexey Kouznetsov <alexey@kouznetsov.com> [1] Obtained from: net-snmp git repo/bug database
Notes
Notes: svn path=/head/; revision=289881
Diffstat (limited to 'net-mgmt/net-snmp')
-rw-r--r--net-mgmt/net-snmp/Makefile2
-rw-r--r--net-mgmt/net-snmp/files/patch-agent__mibgroup__hardware__fsys__hw_fsys.c11
-rw-r--r--net-mgmt/net-snmp/files/patch-agent__mibgroup__ucd-snmp__disk_hw.c10
-rw-r--r--net-mgmt/net-snmp/files/patch-snmplib__system.c35
4 files changed, 57 insertions, 1 deletions
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index b7ac7b5d55e3..38ede3d4731e 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -7,7 +7,7 @@
PORTNAME= snmp
PORTVERSION= 5.7.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= net-mgmt ipv6
MASTER_SITES= SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION}
PKGNAMEPREFIX= net-
diff --git a/net-mgmt/net-snmp/files/patch-agent__mibgroup__hardware__fsys__hw_fsys.c b/net-mgmt/net-snmp/files/patch-agent__mibgroup__hardware__fsys__hw_fsys.c
new file mode 100644
index 000000000000..8c9d7b2d708b
--- /dev/null
+++ b/net-mgmt/net-snmp/files/patch-agent__mibgroup__hardware__fsys__hw_fsys.c
@@ -0,0 +1,11 @@
+--- ./agent/mibgroup/hardware/fsys/hw_fsys.c.orig 2012-01-27 09:59:29.000000000 -0500
++++ ./agent/mibgroup/hardware/fsys/hw_fsys.c 2012-01-27 09:59:38.000000000 -0500
+@@ -334,6 +334,6 @@
+
+ f->size_32 = s;
+ f->units_32 = u;
+- f->avail_32 = f->avail << factor;
+- f->used_32 = f->used << factor;
++ f->avail_32 = f->avail >> factor;
++ f->used_32 = f->used >> factor;
+ }
diff --git a/net-mgmt/net-snmp/files/patch-agent__mibgroup__ucd-snmp__disk_hw.c b/net-mgmt/net-snmp/files/patch-agent__mibgroup__ucd-snmp__disk_hw.c
new file mode 100644
index 000000000000..631f460c9e0b
--- /dev/null
+++ b/net-mgmt/net-snmp/files/patch-agent__mibgroup__ucd-snmp__disk_hw.c
@@ -0,0 +1,10 @@
+--- ./agent/mibgroup/ucd-snmp/disk_hw.c.orig 2012-01-27 09:51:02.000000000 -0500
++++ ./agent/mibgroup/ucd-snmp/disk_hw.c 2012-01-27 09:51:54.000000000 -0500
+@@ -137,6 +137,7 @@
+ if (disks) {
+ free( disks );
+ disks = NULL;
++ maxdisks = numdisks = 0;
+ }
+ allDisksIncluded = 0;
+ }
diff --git a/net-mgmt/net-snmp/files/patch-snmplib__system.c b/net-mgmt/net-snmp/files/patch-snmplib__system.c
new file mode 100644
index 000000000000..015f0a18e1e0
--- /dev/null
+++ b/net-mgmt/net-snmp/files/patch-snmplib__system.c
@@ -0,0 +1,35 @@
+--- ./snmplib/system.c.orig 2012-01-27 10:01:51.000000000 -0500
++++ ./snmplib/system.c 2012-01-27 10:04:22.000000000 -0500
+@@ -933,17 +933,15 @@
+ {
+ #if HAVE_GETHOSTBYADDR
+ struct hostent *hp = NULL;
+- struct sockaddr_in *saddr_in =
+- NETSNMP_REMOVE_CONST(struct sockaddr_in *,addr);
++ char buf[64];
+
+- DEBUGMSGTL(("dns:gethostbyaddr", "resolving { AF_INET, %s:%hu }\n",
+- inet_ntoa(saddr_in->sin_addr), ntohs(saddr_in->sin_port)));
++ DEBUGMSGTL(("dns:gethostbyaddr", "resolving %s\n",
++ inet_ntop(type, addr, buf, sizeof(buf))));
+
+ #ifdef DNSSEC_LOCAL_VALIDATION
+ val_status_t val_status;
+- hp = val_gethostbyaddr(netsnmp_validator_context(),
+- (const void*)&saddr_in->sin_addr,
+- sizeof(struct in_addr), AF_INET, &val_status);
++ hp = val_gethostbyaddr(netsnmp_validator_context(), addr, len, type,
++ &val_status);
+ DEBUGMSGTL(("dns:sec:val", "val_status %d / %s; trusted: %d\n",
+ val_status, p_val_status(val_status),
+ val_istrusted(val_status)));
+@@ -959,8 +957,7 @@
+ else if (val_does_not_exist(val_status) && hp)
+ hp = NULL;
+ #else
+- hp = gethostbyaddr((const void*) &saddr_in->sin_addr,
+- sizeof(struct in_addr), AF_INET);
++ hp = gethostbyaddr(addr, len, type);
+ #endif
+ if (hp == NULL) {
+ DEBUGMSGTL(("dns:gethostbyaddr", "couldn't resolve addr\n"));