aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2008-08-24 23:14:03 +0800
committerkuriyama <kuriyama@FreeBSD.org>2008-08-24 23:14:03 +0800
commitd997b839c69bfb44a72b655bb900237f476a40c2 (patch)
tree3de1e5613cf8d6d8b9a582d0356246bb514605c0 /net-mgmt
parenta1d41dda3437025f2965bf4a13bd7f698e8345a0 (diff)
downloadfreebsd-ports-gnome-d997b839c69bfb44a72b655bb900237f476a40c2.tar.gz
freebsd-ports-gnome-d997b839c69bfb44a72b655bb900237f476a40c2.tar.zst
freebsd-ports-gnome-d997b839c69bfb44a72b655bb900237f476a40c2.zip
o squelch registration warnings on startup [1].
o Treat inactive memory as cache like same behavior as before [2]. Submitted by: bms [1], mwlucas [2] PR: ports/126694 [2]
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/net-snmp-devel/Makefile2
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-agent_registry.c12
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c21
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-memory_freebsd2.c11
-rw-r--r--net-mgmt/net-snmp/Makefile2
-rw-r--r--net-mgmt/net-snmp/files/patch-agent_registry.c12
-rw-r--r--net-mgmt/net-snmp/files/patch-memory_freebsd.c21
-rw-r--r--net-mgmt/net-snmp/files/patch-memory_freebsd2.c11
8 files changed, 52 insertions, 40 deletions
diff --git a/net-mgmt/net-snmp-devel/Makefile b/net-mgmt/net-snmp-devel/Makefile
index bc2a07d5cf33..fee0ee8b61d5 100644
--- a/net-mgmt/net-snmp-devel/Makefile
+++ b/net-mgmt/net-snmp-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= snmp
PORTVERSION= 5.4.1.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
diff --git a/net-mgmt/net-snmp-devel/files/patch-agent_registry.c b/net-mgmt/net-snmp-devel/files/patch-agent_registry.c
new file mode 100644
index 000000000000..8c81bdf5ab52
--- /dev/null
+++ b/net-mgmt/net-snmp-devel/files/patch-agent_registry.c
@@ -0,0 +1,12 @@
+--- agent/agent_registry.c.orig 2008-08-24 23:24:04.944441100 +0900
++++ agent/agent_registry.c 2008-08-24 23:25:37.996227686 +0900
+@@ -532,7 +532,8 @@
+
+ if (next && (next->namelen == new_sub->namelen) &&
+ (next->priority == new_sub->priority)) {
+- netsnmp_assert(!"registration != duplicate"); /* always false */
++ if (new_sub->namelen != 1) /* ignore root OID dups */
++ netsnmp_assert(!"registration != duplicate"); /* always false */
+ return MIB_DUPLICATE_REGISTRATION;
+ }
+
diff --git a/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c b/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c
index 7bf2248c38ed..1f996ad6edf2 100644
--- a/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c
+++ b/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c
@@ -1,5 +1,5 @@
--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2006-03-07 01:23:52.000000000 +0900
-+++ agent/mibgroup/hardware/memory/memory_freebsd.c 2008-07-03 21:32:46.000000000 +0900
++++ agent/mibgroup/hardware/memory/memory_freebsd.c 2008-08-24 23:35:12.857234897 +0900
@@ -47,6 +47,9 @@
int phys_mem_mib[] = { CTL_HW, HW_PHYSMEM };
int user_mem_mib[] = { CTL_HW, HW_USERMEM };
@@ -27,10 +27,15 @@
mem->free = total.t_free;
}
-@@ -129,6 +133,18 @@
- mem->free = -1;
- }
-
+@@ -125,10 +129,22 @@
+ if (!mem->descr)
+ mem->descr = strdup("Cached memory");
+ mem->units = vmem.v_page_size;
+- mem->size = vmem.v_cache_count;
++ mem->size = vmem.v_cache_count + vmem.v_inactive_count;
++ mem->free = -1;
++ }
++
+ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_MBUF, 1 );
+ if (!mem) {
+ snmp_log_perror("No Memory Buffer info entry");
@@ -39,9 +44,9 @@
+ mem->descr = strdup("Memory Buffer");
+ mem->units = pagesize;
+ mem->size = bufspace/pagesize;
-+ mem->free = -1;
-+ }
-+
+ mem->free = -1;
+ }
+
+
nswap = swapmode(pagesize);
mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SWAP, 1 );
diff --git a/net-mgmt/net-snmp-devel/files/patch-memory_freebsd2.c b/net-mgmt/net-snmp-devel/files/patch-memory_freebsd2.c
deleted file mode 100644
index f7b5e603716d..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-memory_freebsd2.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig 2008-03-30 14:37:13.262895421 +0900
-+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c 2008-03-30 14:37:41.921163790 +0900
-@@ -352,7 +352,7 @@
- #ifdef darwin
- long_ret = ptok(mem.v_lookups);
- #else
-- long_ret = ptok(mem.v_cache_count);
-+ long_ret = ptok(mem.v_cache_count) + ptok(mem.v_inactive_count);
- #endif
- return ((u_char *) (&long_ret));
- #endif
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index bc2a07d5cf33..fee0ee8b61d5 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -7,7 +7,7 @@
PORTNAME= snmp
PORTVERSION= 5.4.1.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
diff --git a/net-mgmt/net-snmp/files/patch-agent_registry.c b/net-mgmt/net-snmp/files/patch-agent_registry.c
new file mode 100644
index 000000000000..8c81bdf5ab52
--- /dev/null
+++ b/net-mgmt/net-snmp/files/patch-agent_registry.c
@@ -0,0 +1,12 @@
+--- agent/agent_registry.c.orig 2008-08-24 23:24:04.944441100 +0900
++++ agent/agent_registry.c 2008-08-24 23:25:37.996227686 +0900
+@@ -532,7 +532,8 @@
+
+ if (next && (next->namelen == new_sub->namelen) &&
+ (next->priority == new_sub->priority)) {
+- netsnmp_assert(!"registration != duplicate"); /* always false */
++ if (new_sub->namelen != 1) /* ignore root OID dups */
++ netsnmp_assert(!"registration != duplicate"); /* always false */
+ return MIB_DUPLICATE_REGISTRATION;
+ }
+
diff --git a/net-mgmt/net-snmp/files/patch-memory_freebsd.c b/net-mgmt/net-snmp/files/patch-memory_freebsd.c
index 7bf2248c38ed..1f996ad6edf2 100644
--- a/net-mgmt/net-snmp/files/patch-memory_freebsd.c
+++ b/net-mgmt/net-snmp/files/patch-memory_freebsd.c
@@ -1,5 +1,5 @@
--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2006-03-07 01:23:52.000000000 +0900
-+++ agent/mibgroup/hardware/memory/memory_freebsd.c 2008-07-03 21:32:46.000000000 +0900
++++ agent/mibgroup/hardware/memory/memory_freebsd.c 2008-08-24 23:35:12.857234897 +0900
@@ -47,6 +47,9 @@
int phys_mem_mib[] = { CTL_HW, HW_PHYSMEM };
int user_mem_mib[] = { CTL_HW, HW_USERMEM };
@@ -27,10 +27,15 @@
mem->free = total.t_free;
}
-@@ -129,6 +133,18 @@
- mem->free = -1;
- }
-
+@@ -125,10 +129,22 @@
+ if (!mem->descr)
+ mem->descr = strdup("Cached memory");
+ mem->units = vmem.v_page_size;
+- mem->size = vmem.v_cache_count;
++ mem->size = vmem.v_cache_count + vmem.v_inactive_count;
++ mem->free = -1;
++ }
++
+ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_MBUF, 1 );
+ if (!mem) {
+ snmp_log_perror("No Memory Buffer info entry");
@@ -39,9 +44,9 @@
+ mem->descr = strdup("Memory Buffer");
+ mem->units = pagesize;
+ mem->size = bufspace/pagesize;
-+ mem->free = -1;
-+ }
-+
+ mem->free = -1;
+ }
+
+
nswap = swapmode(pagesize);
mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SWAP, 1 );
diff --git a/net-mgmt/net-snmp/files/patch-memory_freebsd2.c b/net-mgmt/net-snmp/files/patch-memory_freebsd2.c
deleted file mode 100644
index f7b5e603716d..000000000000
--- a/net-mgmt/net-snmp/files/patch-memory_freebsd2.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- agent/mibgroup/ucd-snmp/memory_freebsd2.c.orig 2008-03-30 14:37:13.262895421 +0900
-+++ agent/mibgroup/ucd-snmp/memory_freebsd2.c 2008-03-30 14:37:41.921163790 +0900
-@@ -352,7 +352,7 @@
- #ifdef darwin
- long_ret = ptok(mem.v_lookups);
- #else
-- long_ret = ptok(mem.v_cache_count);
-+ long_ret = ptok(mem.v_cache_count) + ptok(mem.v_inactive_count);
- #endif
- return ((u_char *) (&long_ret));
- #endif