- 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
This commit is contained in:
parent
2076effd19
commit
4200e33a5d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=307614
2 changed files with 47 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= snmp
|
||||
PORTVERSION= 5.7.2
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net-mgmt ipv6
|
||||
MASTER_SITES= SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION}
|
||||
PKGNAMEPREFIX= net-
|
||||
|
@ -88,7 +89,7 @@ CONFIGURE_ARGS+= --with-openssl="${OPENSSLBASE}"
|
|||
CONFIGURE_ARGS+=--with-dummy-values
|
||||
.endif
|
||||
|
||||
.if empty(${PORT_OPTIONS:MTKMIB})
|
||||
.if empty(PORT_OPTIONS:MTKMIB)
|
||||
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-local:Makefile.in
|
||||
PLIST_SUB+= WITH_TKMIB="@comment "
|
||||
.else
|
||||
|
@ -99,7 +100,7 @@ PLIST_SUB+= WITH_TKMIB=""
|
|||
.if ${PORT_OPTIONS:MPERL}
|
||||
USE_PERL5= yes
|
||||
CONFIGURE_ARGS+=--with-perl-modules
|
||||
.if empty(${PORT_OPTIONS:MPERL_EMBEDDED})
|
||||
.if empty(PORT_OPTIONS:MPERL_EMBEDDED)
|
||||
CONFIGURE_ARGS+=--disable-embedded-perl
|
||||
PLIST_SUB+= WITH_PERL_EMBEDDED="@comment "
|
||||
.else
|
||||
|
|
|
@ -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 );
|
Loading…
Reference in a new issue