aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp/files
diff options
context:
space:
mode:
authorRyan Steinmetz <zi@FreeBSD.org>2012-11-21 13:37:10 +0000
committerRyan Steinmetz <zi@FreeBSD.org>2012-11-21 13:37:10 +0000
commit4200e33a5d9267190aefb946e0a31dc2c214f450 (patch)
tree8e14a31027f1fbae7b839dd5296326a02bacb051 /net-mgmt/net-snmp/files
parent2076effd199d4cfc9a602fe51faf3dd68f7c1083 (diff)
- Fix embedded perl support [1]
- Fix segfault during config reload [2] - Bump PORTREVISION PR: ports/173213 [1] Submitted by: Frank Wall <fw@moov.de> [1], Alexey Kouznetsov <alexey@kouznetsov.com> [2] Obtained from: upstream repo [2] Feature safe: yes
Notes
Notes: svn path=/head/; revision=307614
Diffstat (limited to 'net-mgmt/net-snmp/files')
-rw-r--r--net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c b/net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c
new file mode 100644
index 000000000000..5f3fa960a1e3
--- /dev/null
+++ b/net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c
@@ -0,0 +1,44 @@
+--- ./agent/mibgroup/agent/extend.c.orig 2012-10-09 18:28:58.000000000 -0400
++++ ./agent/mibgroup/agent/extend.c 2012-10-24 07:46:37.000000000 -0400
+@@ -34,7 +34,7 @@
+ size_t oid_len;
+ long num_entries;
+ netsnmp_extend *ehead;
+- netsnmp_handler_registration *reg[3];
++ netsnmp_handler_registration *reg[4];
+ struct extend_registration_block_s *next;
+ } extend_registration_block;
+ extend_registration_block *ereg_head = NULL;
+@@ -222,10 +222,13 @@
+ rc = netsnmp_register_watched_scalar2( reg, winfo );
+ if (rc != SNMPERR_SUCCESS)
+ goto bail;
++ eptr->reg[3] = reg;
+
+ return eptr;
+
+ bail:
++ if (eptr->reg[3])
++ netsnmp_unregister_handler(eptr->reg[3]);
+ if (eptr->reg[2])
+ netsnmp_unregister_handler(eptr->reg[2]);
+ if (eptr->reg[1])
+@@ -267,6 +270,7 @@
+ netsnmp_unregister_handler( eptr->reg[0] );
+ netsnmp_unregister_handler( eptr->reg[1] );
+ netsnmp_unregister_handler( eptr->reg[2] );
++ netsnmp_unregister_handler( eptr->reg[3] );
+ SNMP_FREE(eptr);
+ }
+ ereg_head = NULL;
+@@ -550,6 +554,10 @@
+ }
+
+ eptr = _register_extend( oid_buf, oid_len );
++ if (!eptr) {
++ snmp_log(LOG_ERR, "Failed to register extend entry '%s' - possibly duplicate name.\n", exec_name );
++ return;
++ }
+ extension = _new_extension( exec_name, flags, eptr );
+ if (extension) {
+ extension->command = strdup( exec_command );