diff options
author | Ryan Steinmetz <zi@FreeBSD.org> | 2012-11-21 13:37:10 +0000 |
---|---|---|
committer | Ryan Steinmetz <zi@FreeBSD.org> | 2012-11-21 13:37:10 +0000 |
commit | 4200e33a5d9267190aefb946e0a31dc2c214f450 (patch) | |
tree | 8e14a31027f1fbae7b839dd5296326a02bacb051 /net-mgmt/net-snmp | |
parent | 2076effd199d4cfc9a602fe51faf3dd68f7c1083 (diff) | |
download | ports-4200e33a5d9267190aefb946e0a31dc2c214f450.tar.gz ports-4200e33a5d9267190aefb946e0a31dc2c214f450.zip |
Notes
Diffstat (limited to 'net-mgmt/net-snmp')
-rw-r--r-- | net-mgmt/net-snmp/Makefile | 5 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c | 44 |
2 files changed, 47 insertions, 2 deletions
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile index cbd5b07fbb88..ebd6b6177af3 100644 --- a/net-mgmt/net-snmp/Makefile +++ b/net-mgmt/net-snmp/Makefile @@ -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 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 ); |