diff options
author | sevan <sevan@pkgsrc.org> | 2020-06-12 02:22:07 +0000 |
---|---|---|
committer | sevan <sevan@pkgsrc.org> | 2020-06-12 02:22:07 +0000 |
commit | 59ef763b206de7d6b34f55aa14468bda8bb668f3 (patch) | |
tree | bae5b33ffb6bc4a89b83ff70a3d6dc5e92b5e231 | |
parent | 088cfac6c8928724608153b8941196216dd38fdb (diff) | |
download | pkgsrc-59ef763b206de7d6b34f55aa14468bda8bb668f3.tar.gz |
Update to net-snmp 5.8
*5.8*
snmplib:
- TLS/DTLS fixes
- fix usm keychanges for new algorithms and longer keylengths
- IP address formatting fixes
- BUG: 2592: from Stuart Kendrick - increase MAXTC to 16384
- add new sha2 auth protocols
- Restore AES-192 and AES-256 privacy protocols - from
draft-blumenthal-aes-usm-04 (precursor to RFC 3826)
- Use OIDs from http://www.snmp.com/eso/esoConsortiumMIB.txt
- Some code borrowed from PATCH 1346, thanks to
Alexander Ivanov and Vladimir Sukhorukov.
- BUG: 2622: Fix excessive indents in log file
- new config tokens:
- sendMessageMaxSize
- disableSNMPv1 / disableSNMPv2c
- new api for dynamic debug log level (netsnmp_set_debug_log_level)
snmpd:
- SNMP-TARGET-MIB: Fix snmpTargetAddrTAddress
- Com2sec and com2sec6 SOURCE values may deny sources as well as
permit.
- allow trap sinks to set Target-MIB characteristics (name, tag, profile)
- add source addr/port option to trapsink/trap2sink/informsink
- packet filtering by source ip (enableSourceFiltering/filtersource)
- several getbulk handling improvements
- several new APIs introduced for run-time configuration of agent:
- netsnmp_vacm_simple_usm_add/del
- usm_create_usmUser_*
- netsnmp_udp_com2SecEntry_create/netsnmp_udp_com2SecList_remove
- netsnmp_agent_listen_on to open agent port
Win32:
- Add support for the DTLS-UDP and TLS-TCP transports
scripts:
- A new 'checkbandwidth' script to check host min/max bandwidth
snmptranslate:
- Introduce bulk translation mode The special argument "-" causes
snmptranslate to enter bulk translation mode, in which it expects
one OID per line. Whitespace is treated as the end of the OID, and
only that portion of the line is replaced, meaning that this can be
used to translate, e.g., "snmpwalk" output without the proper MIBs
loaded: snmptranslate -m all -OX < numeric.txt > symbolic.txt
building:
- Add Travis and Appveyor CI support
- IPv6 support is now compiled by default. If you need an IPv4-only
agent, use --disable-ipv6.
- Fixed/improved support for several non-Linux platforms
- Many fixes found by Coverity anf Fortify scans
34 files changed, 145 insertions, 1024 deletions
diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile index 33156f0d2af..b8cf001d9c4 100644 --- a/net/net-snmp/Makefile +++ b/net/net-snmp/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.128 2020/04/24 13:27:48 adam Exp $ +# $NetBSD: Makefile,v 1.129 2020/06/12 02:22:07 sevan Exp $ .include "Makefile.common" CATEGORIES= net -PKGREVISION= 13 MAINTAINER= adam@NetBSD.org COMMENT= Extensible SNMP implementation diff --git a/net/net-snmp/Makefile.common b/net/net-snmp/Makefile.common index 5609de2758b..5b62c750c5c 100644 --- a/net/net-snmp/Makefile.common +++ b/net/net-snmp/Makefile.common @@ -1,10 +1,9 @@ -# $NetBSD: Makefile.common,v 1.5 2016/03/05 11:27:52 jperkin Exp $ +# $NetBSD: Makefile.common,v 1.6 2020/06/12 02:22:07 sevan Exp $ # used by net/net-snmp/Makefile # used by net/py-netsnmp/Makefile -DISTNAME= net-snmp-5.7.3 +DISTNAME= net-snmp-5.8 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=net-snmp/} -PKGREVISION= 2 HOMEPAGE= http://www.net-snmp.org/ LICENSE= modified-bsd diff --git a/net/net-snmp/PLIST b/net/net-snmp/PLIST index 74fa4896532..565633e43fe 100644 --- a/net/net-snmp/PLIST +++ b/net/net-snmp/PLIST @@ -1,5 +1,6 @@ -@comment $NetBSD: PLIST,v 1.25 2014/12/31 10:06:57 adam Exp $ +@comment $NetBSD: PLIST,v 1.26 2020/06/12 02:22:07 sevan Exp $ bin/agentxtrap +bin/checkbandwidth bin/encode_keychange ${PLIST.perl}bin/fixproc ${PLIST.perl}bin/ipf-mod.pl @@ -19,10 +20,14 @@ bin/snmpget bin/snmpgetnext bin/snmpinform bin/snmpnetstat +bin/snmppcap +bin/snmpping +bin/snmpps bin/snmpset bin/snmpstatus bin/snmptable bin/snmptest +bin/snmptop bin/snmptranslate bin/snmptrap bin/snmpusm @@ -53,6 +58,7 @@ include/net-snmp/agent/mib_modules.h include/net-snmp/agent/mode_end_call.h include/net-snmp/agent/multiplexer.h include/net-snmp/agent/net-snmp-agent-includes.h +include/net-snmp/agent/netsnmp_close_fds.h include/net-snmp/agent/null.h include/net-snmp/agent/old_api.h include/net-snmp/agent/read_only.h @@ -107,6 +113,7 @@ include/net-snmp/library/lcd_time.h include/net-snmp/library/md5.h include/net-snmp/library/mib.h include/net-snmp/library/mt_support.h +include/net-snmp/library/netsnmp-attribute-format.h include/net-snmp/library/oid.h include/net-snmp/library/oid_stash.h include/net-snmp/library/parse.h @@ -168,6 +175,13 @@ include/net-snmp/system/bsdi4.h include/net-snmp/system/cygwin.h include/net-snmp/system/darwin.h include/net-snmp/system/darwin10.h +include/net-snmp/system/darwin11.h +include/net-snmp/system/darwin12.h +include/net-snmp/system/darwin13.h +include/net-snmp/system/darwin14.h +include/net-snmp/system/darwin15.h +include/net-snmp/system/darwin16.h +include/net-snmp/system/darwin17.h include/net-snmp/system/darwin7.h include/net-snmp/system/darwin8.h include/net-snmp/system/darwin9.h @@ -188,13 +202,17 @@ include/net-snmp/system/freebsd9.h include/net-snmp/system/generic.h include/net-snmp/system/hpux.h include/net-snmp/system/irix.h +include/net-snmp/system/kfreebsd.h include/net-snmp/system/linux.h include/net-snmp/system/mingw32.h +include/net-snmp/system/mingw32msvc.h include/net-snmp/system/mips.h include/net-snmp/system/netbsd.h +include/net-snmp/system/nto-qnx6.h include/net-snmp/system/openbsd.h include/net-snmp/system/openbsd4.h include/net-snmp/system/openbsd5.h +include/net-snmp/system/openbsd6.h include/net-snmp/system/osf5.h include/net-snmp/system/solaris.h include/net-snmp/system/solaris2.3.h @@ -256,6 +274,40 @@ lib/libnetsnmphelpers.la lib/libnetsnmpmibs.la lib/libnetsnmptrapd.la lib/libsnmp.la +${PERL5_SUB_INSTALLARCHLIB}/perllocal.pod +${PERL5_SUB_INSTALLVENDORARCH}/Bundle/MakefileSubs.pm +${PERL5_SUB_INSTALLVENDORARCH}/NetSNMP/ASN.pm +${PERL5_SUB_INSTALLVENDORARCH}/NetSNMP/OID.pm +${PERL5_SUB_INSTALLVENDORARCH}/NetSNMP/TrapReceiver.pm +${PERL5_SUB_INSTALLVENDORARCH}/NetSNMP/agent.pm +${PERL5_SUB_INSTALLVENDORARCH}/NetSNMP/agent/Support.pm +${PERL5_SUB_INSTALLVENDORARCH}/NetSNMP/agent/default_store.pm +${PERL5_SUB_INSTALLVENDORARCH}/NetSNMP/agent/netsnmp_request_infoPtr.pm +${PERL5_SUB_INSTALLVENDORARCH}/NetSNMP/default_store.pm +${PERL5_SUB_INSTALLVENDORARCH}/SNMP.pm +${PERL5_SUB_INSTALLVENDORARCH}/auto/Bundle/NetSNMP/.packlist +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/ASN/ASN.so +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/ASN/autosplit.ix +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/OID/OID.so +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/OID/autosplit.ix +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/TrapReceiver/TrapReceiver.so +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/TrapReceiver/autosplit.ix +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/agent/agent.so +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/agent/autosplit.ix +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/agent/default_store/autosplit.ix +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/agent/default_store/default_store.so +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/default_store/autosplit.ix +${PERL5_SUB_INSTALLVENDORARCH}/auto/NetSNMP/default_store/default_store.so +${PERL5_SUB_INSTALLVENDORARCH}/auto/SNMP/SNMP.so +${PERL5_SUB_INSTALLVENDORARCH}/auto/SNMP/autosplit.ix +${PLIST.perl}${PERL5_SUB_INSTALLVENDORMAN3DIR}/NetSNMP::ASN.3 +${PLIST.perl}${PERL5_SUB_INSTALLVENDORMAN3DIR}/NetSNMP::OID.3 +${PLIST.perl}${PERL5_SUB_INSTALLVENDORMAN3DIR}/NetSNMP::TrapReceiver.3 +${PLIST.perl}${PERL5_SUB_INSTALLVENDORMAN3DIR}/NetSNMP::agent.3 +${PLIST.perl}${PERL5_SUB_INSTALLVENDORMAN3DIR}/NetSNMP::agent::default_store.3 +${PLIST.perl}${PERL5_SUB_INSTALLVENDORMAN3DIR}/NetSNMP::default_store.3 +${PLIST.perl}${PERL5_SUB_INSTALLVENDORMAN3DIR}/NetSNMP::netsnmp_request_infoPtr.3 +${PLIST.perl}${PERL5_SUB_INSTALLVENDORMAN3DIR}/SNMP.3 man/man1/agentxtrap.1 man/man1/encode_keychange.1 man/man1/fixproc.1 @@ -274,10 +326,12 @@ man/man1/snmpget.1 man/man1/snmpgetnext.1 man/man1/snmpinform.1 man/man1/snmpnetstat.1 +man/man1/snmpps.1 man/man1/snmpset.1 man/man1/snmpstatus.1 man/man1/snmptable.1 man/man1/snmptest.1 +man/man1/snmptop.1 man/man1/snmptranslate.1 man/man1/snmptrap.1 man/man1/snmpusm.1 @@ -475,6 +529,7 @@ ${PLIST.perl}share/snmp/mib2c.iterate_access.conf ${PLIST.perl}share/snmp/mib2c.mfd.conf ${PLIST.perl}share/snmp/mib2c.notify.conf ${PLIST.perl}share/snmp/mib2c.old-api.conf +${PLIST.perl}share/snmp/mib2c.org-mode.conf ${PLIST.perl}share/snmp/mib2c.perl.conf ${PLIST.perl}share/snmp/mib2c.raw-table.conf ${PLIST.perl}share/snmp/mib2c.scalar.conf @@ -528,6 +583,7 @@ share/snmp/mibs/SNMP-TSM-MIB.txt share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt share/snmp/mibs/SNMP-USM-AES-MIB.txt share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt +share/snmp/mibs/SNMP-USM-HMAC-SHA2-MIB.txt share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt share/snmp/mibs/SNMPv2-CONF.txt share/snmp/mibs/SNMPv2-MIB.txt diff --git a/net/net-snmp/distinfo b/net/net-snmp/distinfo index 2d8112b3321..721b1136593 100644 --- a/net/net-snmp/distinfo +++ b/net/net-snmp/distinfo @@ -1,38 +1,29 @@ -$NetBSD: distinfo,v 1.95 2019/08/21 09:30:12 otis Exp $ +$NetBSD: distinfo,v 1.96 2020/06/12 02:22:07 sevan Exp $ -SHA1 (net-snmp-5.7.3.tar.gz) = 97dc25077257680815de44e34128d365c76bd839 -RMD160 (net-snmp-5.7.3.tar.gz) = c5cf54d5723ee417e07f1f9fa3936aef505104a2 -SHA512 (net-snmp-5.7.3.tar.gz) = 0758bba5844cfd6c80959ac16b83906a2f830ba49fd0ab1bf9e191dc6a79d312a2e4760bd53b3e1a1c82759481f0064d088d5a3cf475d84b25679a6bd0f049bb -Size (net-snmp-5.7.3.tar.gz) = 6382428 bytes +SHA1 (net-snmp-5.8.tar.gz) = 78f70731df9dcdb13fe8f60eb7d80d7583da4d2c +RMD160 (net-snmp-5.8.tar.gz) = 66770d78f2583cda36e90cc35032d7dae2d354c3 +SHA512 (net-snmp-5.8.tar.gz) = 27895a583b23f3e14c48562bc32f3ba83513d81aa848e878be9a3650f0458d45950635c937ef627135f80b757b663e71fab9a3bde4fd91889153998ae3468fe7 +Size (net-snmp-5.8.tar.gz) = 6591680 bytes SHA1 (patch-ac) = fa5a32e497a7651f4804082d921bb2e91b17d098 -SHA1 (patch-af) = 4fb96b79f9126dedb8a132d44894ea23c9e8c101 SHA1 (patch-ag) = d9595eceeb5ee986ab4365f62e3c3ab339e605aa -SHA1 (patch-agent_mibgroup_agentx_master.c) = c2b3f145280e3fecc26a431ec914cf89d87a17f4 -SHA1 (patch-agent_mibgroup_agentx_master_admin.c) = 3c233c1e3113fbc9c1de34cb4cbacca9ef4a6fe2 -SHA1 (patch-agent_mibgroup_at.c) = 50842f54d98b3cf7bf7028ddbb582b84b7ae682f SHA1 (patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c) = d36d2490448c2dfda0383c67deb36fdb31ff18a3 SHA1 (patch-agent_mibgroup_hardware_fsys_fsys_getfsstats.c) = cee9722d9a3f956726a8760b900ed3a375afde3f SHA1 (patch-agent_mibgroup_hardware_memory_memory__netbsd.c) = 928a5aa99e7893ee91dea3110db8098212e328fa SHA1 (patch-agent_mibgroup_host_data__access_swrun__kinfo.c) = 39888f6489b89bd6598c453977b29519b2f7968f -SHA1 (patch-agent_mibgroup_host_data__access_swrun__procfs__psinfo.c) = f2faca89cf4a53ba5d2bd6ba47730f3dbf242789 -SHA1 (patch-agent_mibgroup_ip-mib_data__access_arp__sysctl.c) = cad87b474cdd469c7ba762ed8a47202c3c6f9240 SHA1 (patch-agent_mibgroup_kernel__sunos5.c) = 3e345f92f42a47959716b0176096c6b0d91aa65a SHA1 (patch-agent_mibgroup_kernel__sunos5.h) = eb80eb5e55020014b1e5524fd572839aefdce5a5 SHA1 (patch-agent_mibgroup_mibII_ipAddr.c) = cd3345a4b30fe2280d0555ee38feb5f957a55b1e -SHA1 (patch-agent_mibgroup_mibII_ipv6.c) = d6a271145e6ba774cbc1e93caa14e3d22dc43075 -SHA1 (patch-agent_mibgroup_mibII_tcpTable.c) = f547f3fd08848803cbf7ce08a41ba463c4d02992 -SHA1 (patch-agent_mibgroup_mibII_udpTable.c) = 2eb5e5c05ecb23f69cbb0d38a31e14d5b5ddc6b7 +SHA1 (patch-agent_mibgroup_mibII_tcpTable.c) = acea4fdb55622df9ed0a45051412de278695c9da +SHA1 (patch-agent_mibgroup_mibII_udpTable.c) = 7726d27a52a03c16bd220530ddb41b896cfec089 SHA1 (patch-agent_mibgroup_var__route.c) = 919348e62849367793e4abf7d608d9824eb8ff2d -SHA1 (patch-agent_snmp__agent.c) = 2dbfea907d0e1881f5d55c5b270984fc3a562da9 SHA1 (patch-agent_snmp__perl.c) = 893cf46624d4f26941b3911a64c752c110ba6ef8 SHA1 (patch-ai) = 04c2a487bad8705c9725ef4a62016051d3898970 SHA1 (patch-aj) = d110e996d0538d17251d39a5eed46df6944ba0fa SHA1 (patch-ak) = 50ac67db8a9ffc16d983b4192e74db25ef439321 SHA1 (patch-am) = d01e8a93f6e766cedfdc324efd69168f71aac76f SHA1 (patch-ap) = 44a4ce6302457094ba2b200e4c47ff6c2a425746 -SHA1 (patch-apps_snmpusm.c) = 5df02e77038cf36cd5fafe19df7bc095b12a4a8f SHA1 (patch-aq) = a8fe703d8902c2847ca6692af4400ddbf9cbe74b -SHA1 (patch-configure.d_config__os__libs2) = 9dd3f200295460b9c43a249c60508ce5f142fbed +SHA1 (patch-configure) = 9f0c9f936881608842d71a4ee90875dd9a3fe533 SHA1 (patch-da) = 40e8d78bad93ca12f4c08c43b86e7f13edafc299 SHA1 (patch-db) = 281be9a88860987880c71770f4050fd965dd8ed9 SHA1 (patch-dl) = 92563fd6be6f27be5b348cdc8bc02061374026b0 @@ -40,22 +31,4 @@ SHA1 (patch-dt) = 452fee78b37f8ce0eb30049f9f18b04cff9b6e6e SHA1 (patch-du) = 51d2c7e11b3d422e57ea2f5761aff624f7333842 SHA1 (patch-el) = b23d7ae82d367d457181d231a56c80e648b0ee6e SHA1 (patch-es) = 7336d905bac315f344f93664e4118332f88fb6ee -SHA1 (patch-include_net-snmp_agent_snmp__agent.h) = 2139d849b0ffe004a72f3276a98c0d2cb72dca18 -SHA1 (patch-include_net-snmp_system_netbsd.h) = 7880fded678147b2cc75e035234b89727e213d00 -SHA1 (patch-perl_ASN_Makefile.PL) = 895ad5ccefee6a271650a822e2bac31c5b9d62d5 -SHA1 (patch-perl_AnyData__SNMP_Makefile.PL) = 6d99ac8db72682f9ff074ba8239d7242c149b9bf -SHA1 (patch-perl_OID_Makefile.PL) = 8cbc9e6e3ee422851df62a400f6df30dfe271c88 -SHA1 (patch-perl_SNMP_Makefile.PL) = 252fe35a8d93f38ae2454e962546a7b77967d9c2 -SHA1 (patch-perl_SNMP_SNMP.xs) = 99860cdfea3170ed3777f61cb8b5abe9d49ce44c -SHA1 (patch-perl_TrapReceiver_Makefile.PL) = b0e6350d3a4142e6b998ca11131279896abd4eb1 -SHA1 (patch-perl_TrapReceiver_TrapReceiver.xs) = 4a49bc4a767a1ff1ded925876470168baa86359b -SHA1 (patch-perl_agent_Makefile.PL) = 267dbc5c663ca3823e37e8afcc42f19986bc1a9f -SHA1 (patch-perl_agent_Support_Makefile.PL) = 7ee55ea96e2eeb275f7eed9d7bbc446c7195af4c -SHA1 (patch-perl_agent_agent.xs) = de018255afd1790f7cab70591505dabd6cd15047 -SHA1 (patch-perl_agent_default__store_Makefile.PL) = 0599d99ce5226eaeaab3f1af76c68bfe7e57e1bd -SHA1 (patch-perl_default__store_Makefile.PL) = ed5ad7385680632b2153fa572635c5aea83c9114 -SHA1 (patch-perl_manager_Makefile.PL) = bb34b119a2b3887a1af1f9b88e6d4bad6baf60bb -SHA1 (patch-snmplib_keytools.c) = c209a42a2767c8639d8535e02542de119264ebfc -SHA1 (patch-snmplib_scapi.c) = 9a49b1a00df8f9ab6bd69057f806377e9164cf1f -SHA1 (patch-snmplib_snmp__api.c) = b4f498aa93b61f809e3696df1fc6bf32bd942233 SHA1 (patch-snmplib_transports_snmpUDPBaseDomain.c) = a7eec599e1cfb2fbd22d0dd53412727b5ff1825d diff --git a/net/net-snmp/patches/patch-agent_mibgroup_agentx_master.c b/net/net-snmp/patches/patch-agent_mibgroup_agentx_master.c deleted file mode 100644 index f06457b6c9e..00000000000 --- a/net/net-snmp/patches/patch-agent_mibgroup_agentx_master.c +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-agent_mibgroup_agentx_master.c,v 1.1 2014/01/26 21:33:06 spz Exp $ - -patch for CVE-2012-6151 from -http://sourceforge.net/p/net-snmp/patches/_discuss/thread/36675011/e98b/attachment/alt-cancel-next-walk-v2.patch - ---- agent/mibgroup/agentx/master.c.orig 2012-10-09 22:28:58.000000000 +0000 -+++ agent/mibgroup/agentx/master.c -@@ -219,7 +219,13 @@ agentx_got_response(int operation, - if (!cache) { - DEBUGMSGTL(("agentx/master", "response too late on session %8p\n", - session)); -- return 0; -+ /* -+ * Response is too late, free the cache and return 1 -+ * so that the session pending request list item can be deleted -+ */ -+ if (magic) -+ netsnmp_free_delegated_cache((netsnmp_delegated_cache*) magic); -+ return 1; - } - requests = cache->requests; - -@@ -606,6 +612,8 @@ agentx_master_handler(netsnmp_mib_handle - result = snmp_async_send(ax_session, pdu, agentx_got_response, cb_data); - if (result == 0) { - snmp_free_pdu(pdu); -+ if (cb_data) -+ netsnmp_free_delegated_cache((netsnmp_delegated_cache*) cb_data); - } - - return SNMP_ERR_NOERROR; diff --git a/net/net-snmp/patches/patch-agent_mibgroup_agentx_master_admin.c b/net/net-snmp/patches/patch-agent_mibgroup_agentx_master_admin.c deleted file mode 100644 index f69c8672cd3..00000000000 --- a/net/net-snmp/patches/patch-agent_mibgroup_agentx_master_admin.c +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-agent_mibgroup_agentx_master_admin.c,v 1.1 2014/01/26 21:33:06 spz Exp $ - -patch for CVE-2012-6151 from -http://sourceforge.net/p/net-snmp/patches/_discuss/thread/36675011/e98b/attachment/alt-cancel-next-walk-v2.patch - ---- agent/mibgroup/agentx/master_admin.c.orig 2012-10-09 22:28:58.000000000 +0000 -+++ agent/mibgroup/agentx/master_admin.c -@@ -153,6 +153,7 @@ close_agentx_session(netsnmp_session * s - for (sp = session->subsession; sp != NULL; sp = sp->next) { - - if (sp->sessid == sessid) { -+ netsnmp_remove_delegated_requests_for_session(sp); - unregister_mibs_by_session(sp); - unregister_index_by_session(sp); - unregister_sysORTable_by_session(sp); diff --git a/net/net-snmp/patches/patch-agent_mibgroup_at.c b/net/net-snmp/patches/patch-agent_mibgroup_at.c deleted file mode 100644 index 79e7f60f10f..00000000000 --- a/net/net-snmp/patches/patch-agent_mibgroup_at.c +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-agent_mibgroup_at.c,v 1.1 2016/04/29 19:47:21 adam Exp $ - -Fix for systems with RTF_LLDATA in place of RTF_LLINFO. - ---- agent/mibgroup/mibII/at.c.orig 2016-04-29 19:32:13.000000000 +0000 -+++ agent/mibgroup/mibII/at.c -@@ -101,7 +101,7 @@ - #include <net-snmp/data_access/interface.h> - - #if defined(HAVE_SYS_SYSCTL_H) && !defined(NETSNMP_CAN_USE_SYSCTL) --# if defined(RTF_LLINFO) -+# if defined(RTF_LLINFO) || defined(RTF_LLDATA) - # define NETSNMP_CAN_USE_SYSCTL 1 - # endif - #endif -@@ -691,7 +691,9 @@ ARP_Scan_Init(void) - mib[2] = 0; - mib[3] = AF_INET; - mib[4] = NET_RT_FLAGS; --#if defined RTF_LLINFO -+#if defined RTF_LLDATA -+ mib[5] = RTF_LLDATA; -+#elif defined RTF_LLINFO - mib[5] = RTF_LLINFO; - #else - mib[5] = 0; diff --git a/net/net-snmp/patches/patch-agent_mibgroup_host_data__access_swrun__procfs__psinfo.c b/net/net-snmp/patches/patch-agent_mibgroup_host_data__access_swrun__procfs__psinfo.c deleted file mode 100644 index dea09ca3e30..00000000000 --- a/net/net-snmp/patches/patch-agent_mibgroup_host_data__access_swrun__procfs__psinfo.c +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-agent_mibgroup_host_data__access_swrun__procfs__psinfo.c,v 1.2 2019/08/21 09:30:12 otis Exp $ - -Fix compilation on Solaris 11 and also on SmartOS. - ---- agent/mibgroup/host/data_access/swrun_procfs_psinfo.c.orig 2014-12-08 20:23:22.000000000 +0000 -+++ agent/mibgroup/host/data_access/swrun_procfs_psinfo.c -@@ -23,6 +23,8 @@ - #include <fcntl.h> - #endif - -+#include <sys/thread.h> -+ - #define HAVE_SYS_PROCFS_H /* XXX - Needs a configure check! */ - #ifdef HAVE_SYS_PROCFS_H - #define _KERNEL /* For psinfo_t */ diff --git a/net/net-snmp/patches/patch-agent_mibgroup_ip-mib_data__access_arp__sysctl.c b/net/net-snmp/patches/patch-agent_mibgroup_ip-mib_data__access_arp__sysctl.c deleted file mode 100644 index c7ed107e79b..00000000000 --- a/net/net-snmp/patches/patch-agent_mibgroup_ip-mib_data__access_arp__sysctl.c +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-agent_mibgroup_ip-mib_data__access_arp__sysctl.c,v 1.1 2016/04/29 19:47:21 adam Exp $ - -Fix for systems with RTF_LLDATA in place of RTF_LLINFO. - ---- agent/mibgroup/ip-mib/data_access/arp_sysctl.c.orig 2016-04-29 19:29:57.000000000 +0000 -+++ agent/mibgroup/ip-mib/data_access/arp_sysctl.c -@@ -129,7 +129,11 @@ _load_arp_table_from_sysctl(netsnmp_arp_ - mib[2] = 0; - mib[3] = AF_INET; - mib[4] = NET_RT_FLAGS; -+#ifdef RTF_LLDATA -+ mib[5] = RTF_LLDATA; -+#else - mib[5] = RTF_LLINFO; -+#endif - - err = 0; - buf = newbuf = NULL; -@@ -236,7 +240,11 @@ _load_ndp_table_from_sysctl(netsnmp_arp_ - mib[2] = 0; - mib[3] = AF_INET6; - mib[4] = NET_RT_FLAGS; -+#ifdef RTF_LLDATA -+ mib[5] = RTF_LLDATA; -+#else - mib[5] = RTF_LLINFO; -+#endif - - err = 0; - buf = newbuf = NULL; diff --git a/net/net-snmp/patches/patch-agent_mibgroup_mibII_ipv6.c b/net/net-snmp/patches/patch-agent_mibgroup_mibII_ipv6.c deleted file mode 100644 index 74a11744043..00000000000 --- a/net/net-snmp/patches/patch-agent_mibgroup_mibII_ipv6.c +++ /dev/null @@ -1,50 +0,0 @@ -$NetBSD: patch-agent_mibgroup_mibII_ipv6.c,v 1.1 2013/11/29 12:59:51 joerg Exp $ - ---- agent/mibgroup/mibII/ipv6.c.orig 2013-11-26 22:18:51.000000000 +0000 -+++ agent/mibgroup/mibII/ipv6.c -@@ -1336,7 +1336,11 @@ var_udp6(register struct variable * vp, - DEBUGMSGOID(("mibII/ipv6", name, *length)); - DEBUGMSG(("mibII/ipv6", " %d\n", exact)); - --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/ -+#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 -+ if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable))) -+ return NULL; -+ first = p = (caddr_t)TAILQ_FIRST(&udbtable.inpt_queue); -+#elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/ - if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable))) - return NULL; - first = p = (caddr_t)udbtable.inpt_queue.cqh_first; -@@ -1473,6 +1477,9 @@ var_udp6(register struct variable * vp, - #if defined(openbsd4) - p = (caddr_t)in6pcb.inp_queue.cqe_next; - if (p == first) break; -+#elif defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 -+ p = (caddr_t)TAILQ_NEXT(&in6pcb, in6p_queue); -+ if (p == first) break; - #elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ - p = (caddr_t)in6pcb.in6p_queue.cqe_next; - if (p == first) break; -@@ -1780,7 +1787,11 @@ var_tcp6(register struct variable * vp, - DEBUGMSGOID(("mibII/ipv6", name, *length)); - DEBUGMSG(("mibII/ipv6", " %d\n", exact)); - --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/ -+#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 -+ if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable))) -+ return NULL; -+ first = p = (caddr_t)TAILQ_FIRST(&tcbtable.inpt_queue); -+#elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/ - if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable))) - return NULL; - first = p = (caddr_t)tcbtable.inpt_queue.cqh_first; -@@ -1928,6 +1939,9 @@ var_tcp6(register struct variable * vp, - #if defined(openbsd4) - p = (caddr_t)in6pcb.inp_queue.cqe_next; - if (p == first) break; -+#elif defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 -+ p = (caddr_t)TAILQ_NEXT(&in6pcb, in6p_queue); -+ if (p == first) break; - #elif defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 || defined(openbsd4) /*1.6Y*/ - p = (caddr_t)in6pcb.in6p_queue.cqe_next; - if (p == first) break; diff --git a/net/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable.c b/net/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable.c index 90c27733ffe..618cae150c3 100644 --- a/net/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable.c +++ b/net/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable.c @@ -1,20 +1,21 @@ -$NetBSD: patch-agent_mibgroup_mibII_tcpTable.c,v 1.1 2013/11/29 12:59:51 joerg Exp $ +$NetBSD: patch-agent_mibgroup_mibII_tcpTable.c,v 1.2 2020/06/12 02:22:08 sevan Exp $ ---- agent/mibgroup/mibII/tcpTable.c.orig 2013-11-26 22:24:01.000000000 +0000 -+++ agent/mibgroup/mibII/tcpTable.c -@@ -946,7 +946,11 @@ tcpTable_load(netsnmp_cache *cache, void + +--- agent/mibgroup/mibII/tcpTable.c.orig 2020-06-12 02:28:28.274144065 +0100 ++++ agent/mibgroup/mibII/tcpTable.c 2020-06-12 02:30:19.848438704 +0100 +@@ -1043,7 +1043,11 @@ /* * Set up a linked list */ +#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + entry = TAILQ_FIRST(&table.inpt_queue); +#else - entry = table.inpt_queue.cqh_first; + entry = table.INP_FIRST_SYMBOL; +#endif while (entry) { nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb); -@@ -970,8 +974,13 @@ tcpTable_load(netsnmp_cache *cache, void +@@ -1067,8 +1071,13 @@ nnew->inp_next = tcp_head; tcp_head = nnew; @@ -22,7 +23,7 @@ $NetBSD: patch-agent_mibgroup_mibII_tcpTable.c,v 1.1 2013/11/29 12:59:51 joerg E + if (entry == TAILQ_FIRST(&table.inpt_queue)) + break; +#else - if (entry == table.inpt_queue.cqh_first) + if (entry == table.INP_FIRST_SYMBOL) break; +#endif } diff --git a/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c b/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c index 00de5b1775f..dc218ae714b 100644 --- a/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c +++ b/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c @@ -1,8 +1,9 @@ -$NetBSD: patch-agent_mibgroup_mibII_udpTable.c,v 1.1 2013/11/29 12:59:51 joerg Exp $ +$NetBSD: patch-agent_mibgroup_mibII_udpTable.c,v 1.2 2020/06/12 02:22:08 sevan Exp $ ---- agent/mibgroup/mibII/udpTable.c.orig 2013-11-26 22:25:02.000000000 +0000 -+++ agent/mibgroup/mibII/udpTable.c -@@ -395,7 +395,11 @@ udpTable_next_entry( void **loop_context + +--- agent/mibgroup/mibII/udpTable.c.orig 2020-06-12 01:53:58.092446674 +0100 ++++ agent/mibgroup/mibII/udpTable.c 2020-06-12 02:01:40.556941658 +0100 +@@ -426,7 +426,11 @@ * and update the loop context ready for the next one. */ *data_context = (void*)entry; @@ -14,7 +15,7 @@ $NetBSD: patch-agent_mibgroup_mibII_udpTable.c,v 1.1 2013/11/29 12:59:51 joerg E return index; } -@@ -405,7 +409,11 @@ udpTable_free(netsnmp_cache *cache, void +@@ -436,7 +440,11 @@ UDPTABLE_ENTRY_TYPE *p; while (udp_head) { p = udp_head; @@ -26,28 +27,28 @@ $NetBSD: patch-agent_mibgroup_mibII_udpTable.c,v 1.1 2013/11/29 12:59:51 joerg E free(p); } -@@ -705,7 +713,11 @@ udpTable_load(netsnmp_cache *cache, void +@@ -744,7 +752,11 @@ /* * Set up a linked list */ +#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 + entry = TAILQ_FIRST(&table.inpt_queue); +#else - entry = table.inpt_queue.cqh_first; + entry = table.INP_FIRST_SYMBOL; +#endif while (entry) { nnew = SNMP_MALLOC_TYPEDEF(struct inpcb); -@@ -717,12 +729,22 @@ udpTable_load(netsnmp_cache *cache, void +@@ -801,12 +813,22 @@ break; } +#if defined(__NetBSD__) && __NetBSD_Version__ >= 699002800 -+ entry = TAILQ_NEXT(nnew, inp_queue); /* Next kernel entry */ -+ TAILQ_NEXT(nnew, inp_queue) = udp_head; ++ entry = TAILQ_NEXT(nnew, inp_queue); /* Next kernel entry */ ++ TAILQ_NEXT(nnew, inp_queue) = udp_head; +#else - entry = nnew->inp_queue.cqe_next; /* Next kernel entry */ - nnew->inp_queue.cqe_next = udp_head; + entry = nnew->INP_NEXT_SYMBOL; /* Next kernel entry */ + nnew->INP_NEXT_SYMBOL = udp_head; +#endif udp_head = nnew; @@ -55,7 +56,7 @@ $NetBSD: patch-agent_mibgroup_mibII_udpTable.c,v 1.1 2013/11/29 12:59:51 joerg E + if (entry == TAILQ_FIRST(&table.inpt_queue)) + break; +#else - if (entry == table.inpt_queue.cqh_first) + if (entry == udp_inpcb.INP_NEXT_SYMBOL) break; +#endif } diff --git a/net/net-snmp/patches/patch-agent_snmp__agent.c b/net/net-snmp/patches/patch-agent_snmp__agent.c deleted file mode 100644 index fb51d3e6c4b..00000000000 --- a/net/net-snmp/patches/patch-agent_snmp__agent.c +++ /dev/null @@ -1,151 +0,0 @@ -$NetBSD: patch-agent_snmp__agent.c,v 1.1 2014/01/26 21:33:06 spz Exp $ - -patch for CVE-2012-6151 from -http://sourceforge.net/p/net-snmp/patches/_discuss/thread/36675011/e98b/attachment/alt-cancel-next-walk-v2.patch - ---- agent/snmp_agent.c.orig 2012-10-09 22:28:58.000000000 +0000 -+++ agent/snmp_agent.c -@@ -1409,6 +1409,7 @@ init_agent_snmp_session(netsnmp_session - asp->treecache_num = -1; - asp->treecache_len = 0; - asp->reqinfo = SNMP_MALLOC_TYPEDEF(netsnmp_agent_request_info); -+ asp->flags = SNMP_AGENT_FLAGS_NONE; - DEBUGMSGTL(("verbose:asp", "asp %p reqinfo %p created\n", - asp, asp->reqinfo)); - -@@ -1458,6 +1459,9 @@ netsnmp_check_for_delegated(netsnmp_agen - if (NULL == asp->treecache) - return 0; - -+ if (asp->flags & SNMP_AGENT_FLAGS_CANCEL_IN_PROGRESS) -+ return 0; -+ - for (i = 0; i <= asp->treecache_num; i++) { - for (request = asp->treecache[i].requests_begin; request; - request = request->next) { -@@ -1535,39 +1539,48 @@ int - netsnmp_remove_delegated_requests_for_session(netsnmp_session *sess) - { - netsnmp_agent_session *asp; -- int count = 0; -+ int total_count = 0; - - for (asp = agent_delegated_list; asp; asp = asp->next) { - /* - * check each request - */ -+ int i; -+ int count = 0; - netsnmp_request_info *request; -- for(request = asp->requests; request; request = request->next) { -- /* -- * check session -- */ -- netsnmp_assert(NULL!=request->subtree); -- if(request->subtree->session != sess) -- continue; -- -- /* -- * matched! mark request as done -- */ -- netsnmp_request_set_error(request, SNMP_ERR_GENERR); -- ++count; -+ for (i = 0; i <= asp->treecache_num; i++) { -+ for(request = asp->requests; request; -+ request = request->next) { -+ /* -+ * check session -+ */ -+ netsnmp_assert(NULL!=request->subtree); -+ if(request->subtree->session != sess) -+ continue; -+ -+ /* -+ * matched! mark request as done -+ */ -+ netsnmp_request_set_error(request, SNMP_ERR_GENERR); -+ ++count; -+ } -+ } -+ if (count) { -+ asp->flags |= SNMP_AGENT_FLAGS_CANCEL_IN_PROGRESS; -+ total_count += count; - } - } - - /* - * if we found any, that request may be finished now - */ -- if(count) { -+ if(total_count) { - DEBUGMSGTL(("snmp_agent", "removed %d delegated request(s) for session " -- "%8p\n", count, sess)); -- netsnmp_check_outstanding_agent_requests(); -+ "%8p\n", total_count, sess)); -+ netsnmp_check_delegated_requests(); - } - -- return count; -+ return total_count; - } - - int -@@ -2739,13 +2752,8 @@ handle_var_requests(netsnmp_agent_sessio - return final_status; - } - --/* -- * loop through our sessions known delegated sessions and check to see -- * if they've completed yet. If there are no more delegated sessions, -- * check for and process any queued requests -- */ - void --netsnmp_check_outstanding_agent_requests(void) -+netsnmp_check_delegated_requests(void) - { - netsnmp_agent_session *asp, *prev_asp = NULL, *next_asp = NULL; - -@@ -2790,6 +2798,22 @@ netsnmp_check_outstanding_agent_requests - prev_asp = asp; - } - } -+} -+ -+/* -+ * loop through our sessions known delegated sessions and check to see -+ * if they've completed yet. If there are no more delegated sessions, -+ * check for and process any queued requests -+ */ -+void -+netsnmp_check_outstanding_agent_requests(void) -+{ -+ netsnmp_agent_session *asp; -+ -+ /* -+ * deal with delegated requests -+ */ -+ netsnmp_check_delegated_requests(); - - /* - * if we are processing a set and there are more delegated -@@ -2819,7 +2843,8 @@ netsnmp_check_outstanding_agent_requests - - netsnmp_processing_set = netsnmp_agent_queued_list; - DEBUGMSGTL(("snmp_agent", "SET request remains queued while " -- "delegated requests finish, asp = %8p\n", asp)); -+ "delegated requests finish, asp = %8p\n", -+ agent_delegated_list)); - break; - } - #endif /* NETSNMP_NO_WRITE_SUPPORT */ -@@ -2880,6 +2905,10 @@ check_delayed_request(netsnmp_agent_sess - case SNMP_MSG_GETBULK: - case SNMP_MSG_GETNEXT: - netsnmp_check_all_requests_status(asp, 0); -+ if (asp->flags & SNMP_AGENT_FLAGS_CANCEL_IN_PROGRESS) { -+ DEBUGMSGTL(("snmp_agent","canceling next walk for asp %p\n", asp)); -+ break; -+ } - handle_getnext_loop(asp); - if (netsnmp_check_for_delegated(asp) && - netsnmp_check_transaction_id(asp->pdu->transid) != diff --git a/net/net-snmp/patches/patch-apps_snmpusm.c b/net/net-snmp/patches/patch-apps_snmpusm.c deleted file mode 100644 index 7aae80e8229..00000000000 --- a/net/net-snmp/patches/patch-apps_snmpusm.c +++ /dev/null @@ -1,102 +0,0 @@ -$NetBSD: patch-apps_snmpusm.c,v 1.1 2018/02/25 18:35:30 wiz Exp $ - -From: Andreas Henriksson <andreas@fatal.se> -Date: Sat, 23 Dec 2017 22:25:41 +0000 -Subject: [PATCH] Port OpenSSL 1.1.0 with support for 1.0.2 - -Initial support for OpenSSL 1.1.0 - -Changes by sebastian@breakpoint.cc: -- added OpenSSL 1.0.2 glue layer for backwarts compatibility -- dropped HAVE_EVP_MD_CTX_CREATE + DESTROY and added a check for OpenSSL - version instead (and currently 1.0.2 is the only one supported). - -BTS: https://bugs.debian.org/828449 -Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> ---- - apps/snmpusm.c | 43 ++++++++++++++++++++++++++++++++++++------- - configure.d/config_os_libs2 | 6 ------ - snmplib/keytools.c | 13 ++++++------- - snmplib/scapi.c | 17 +++++------------ - 4 files changed, 47 insertions(+), 32 deletions(-) - - ---- apps/snmpusm.c.orig 2018-02-25 18:04:17.011901242 +0000 -+++ apps/snmpusm.c -@@ -183,6 +183,31 @@ setup_oid(oid * it, size_t * len, u_char - } - - #if defined(HAVE_OPENSSL_DH_H) && defined(HAVE_LIBCRYPTO) -+ -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) -+ -+static void DH_get0_pqg(const DH *dh, -+ const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) -+{ -+ if (p != NULL) -+ *p = dh->p; -+ if (q != NULL) -+ *q = dh->q; -+ if (g != NULL) -+ *g = dh->g; -+} -+ -+static void DH_get0_key(const DH *dh, const BIGNUM **pub_key, -+ const BIGNUM **priv_key) -+{ -+ if (pub_key != NULL) -+ *pub_key = dh->pub_key; -+ if (priv_key != NULL) -+ *priv_key = dh->priv_key; -+} -+ -+#endif -+ - int - get_USM_DH_key(netsnmp_variable_list *vars, netsnmp_variable_list *dhvar, - size_t outkey_len, -@@ -190,7 +215,7 @@ get_USM_DH_key(netsnmp_variable_list *va - oid *keyoid, size_t keyoid_len) { - u_char *dhkeychange; - DH *dh; -- BIGNUM *other_pub; -+ const BIGNUM *p, *g, *pub_key, *other_pub; - u_char *key; - size_t key_len; - -@@ -205,25 +230,29 @@ get_USM_DH_key(netsnmp_variable_list *va - dh = d2i_DHparams(NULL, &cp, dhvar->val_len); - } - -- if (!dh || !dh->g || !dh->p) { -+ if (dh) -+ DH_get0_pqg(dh, &p, NULL, &g); -+ -+ if (!dh || !g || !p) { - SNMP_FREE(dhkeychange); - return SNMPERR_GENERR; - } - -- DH_generate_key(dh); -- if (!dh->pub_key) { -+ if (!DH_generate_key(dh)) { - SNMP_FREE(dhkeychange); - return SNMPERR_GENERR; - } - -- if (vars->val_len != (unsigned int)BN_num_bytes(dh->pub_key)) { -+ DH_get0_key(dh, &pub_key, NULL); -+ -+ if (vars->val_len != (unsigned int)BN_num_bytes(pub_key)) { - SNMP_FREE(dhkeychange); - fprintf(stderr,"incorrect diffie-helman lengths (%lu != %d)\n", -- (unsigned long)vars->val_len, BN_num_bytes(dh->pub_key)); -+ (unsigned long)vars->val_len, BN_num_bytes(pub_key)); - return SNMPERR_GENERR; - } - -- BN_bn2bin(dh->pub_key, dhkeychange + vars->val_len); -+ BN_bn2bin(pub_key, dhkeychange + vars->val_len); - - key_len = DH_size(dh); - if (!key_len) { diff --git a/net/net-snmp/patches/patch-af b/net/net-snmp/patches/patch-configure index f6ba8720c3d..1a0cad88a9a 100644 --- a/net/net-snmp/patches/patch-af +++ b/net/net-snmp/patches/patch-configure @@ -1,8 +1,48 @@ -$NetBSD: patch-af,v 1.16 2013/03/17 00:15:29 gdt Exp $ +$NetBSD: patch-configure,v 1.1 2020/06/12 02:22:08 sevan Exp $ ---- configure.orig 2012-10-09 22:35:37.000000000 +0000 -+++ configure -@@ -20981,6 +20981,81 @@ fi +- Fix configure to look for des_cbc_encrypt in -ldes +- Fix configure on FreeBSD 10 & newer +- Fix portability bug in test + +--- configure.orig 2018-07-16 15:33:50.000000000 +0100 ++++ configure 2020-06-12 00:08:19.741995000 +0100 +@@ -13923,7 +13923,7 @@ + hardcode_shlibpath_var=no + ;; + +- freebsd1*) ++ freebsd1.*) + ld_shlibs=no + ;; + +@@ -14917,7 +14917,7 @@ + shlibpath_var=LD_LIBRARY_PATH + ;; + +-freebsd1*) ++freebsd1.*) + dynamic_linker=no + ;; + +@@ -14928,7 +14928,7 @@ + objformat=`/usr/bin/objformat` + else + case $host_os in +- freebsd[123]*) objformat=aout ;; ++ freebsd[123].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi +@@ -19637,7 +19637,7 @@ + fi + + # Linux systemd +-if test "x$with_systemd" == "xyes"; then ++if test "x$with_systemd" = "xyes"; then + other_src_list="$other_src_list sd-daemon.c" + other_objs_list="$other_objs_list sd-daemon.o" + other_lobjs_list="$other_lobjs_list sd-daemon.lo" +@@ -22715,6 +22715,81 @@ ## ######################################### @@ -84,3 +124,14 @@ $NetBSD: patch-af,v 1.16 2013/03/17 00:15:29 gdt Exp $ ## # Compilation-related ## +@@ -32360,6 +32435,10 @@ + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; diff --git a/net/net-snmp/patches/patch-configure.d_config__os__libs2 b/net/net-snmp/patches/patch-configure.d_config__os__libs2 deleted file mode 100644 index 9bc6d7208be..00000000000 --- a/net/net-snmp/patches/patch-configure.d_config__os__libs2 +++ /dev/null @@ -1,37 +0,0 @@ -$NetBSD: patch-configure.d_config__os__libs2,v 1.1 2018/02/25 18:35:30 wiz Exp $ - -From: Andreas Henriksson <andreas@fatal.se> -Date: Sat, 23 Dec 2017 22:25:41 +0000 -Subject: [PATCH] Port OpenSSL 1.1.0 with support for 1.0.2 - -Initial support for OpenSSL 1.1.0 - -Changes by sebastian@breakpoint.cc: -- added OpenSSL 1.0.2 glue layer for backwarts compatibility -- dropped HAVE_EVP_MD_CTX_CREATE + DESTROY and added a check for OpenSSL - version instead (and currently 1.0.2 is the only one supported). - -BTS: https://bugs.debian.org/828449 -Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> ---- - apps/snmpusm.c | 43 ++++++++++++++++++++++++++++++++++++------- - configure.d/config_os_libs2 | 6 ------ - snmplib/keytools.c | 13 ++++++------- - snmplib/scapi.c | 17 +++++------------ - 4 files changed, 47 insertions(+), 32 deletions(-) - ---- configure.d/config_os_libs2.orig 2018-02-25 18:04:17.012343125 +0000 -+++ configure.d/config_os_libs2 -@@ -291,12 +291,6 @@ if test "x$tryopenssl" != "xno" -a "x$tr - AC_CHECK_LIB(${CRYPTO}, AES_cfb128_encrypt, - AC_DEFINE(HAVE_AES_CFB128_ENCRYPT, 1, - [Define to 1 if you have the `AES_cfb128_encrypt' function.])) -- -- AC_CHECK_LIB(${CRYPTO}, EVP_MD_CTX_create, -- AC_DEFINE([HAVE_EVP_MD_CTX_CREATE], [], -- [Define to 1 if you have the `EVP_MD_CTX_create' function.]) -- AC_DEFINE([HAVE_EVP_MD_CTX_DESTROY], [], -- [Define to 1 if you have the `EVP_MD_CTX_destroy' function.])) - fi - if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then - AC_CHECK_LIB(ssl, DTLSv1_method, diff --git a/net/net-snmp/patches/patch-include_net-snmp_agent_snmp__agent.h b/net/net-snmp/patches/patch-include_net-snmp_agent_snmp__agent.h deleted file mode 100644 index 7edda043093..00000000000 --- a/net/net-snmp/patches/patch-include_net-snmp_agent_snmp__agent.h +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-include_net-snmp_agent_snmp__agent.h,v 1.1 2014/01/26 21:33:06 spz Exp $ - -patch for CVE-2012-6151 from -http://sourceforge.net/p/net-snmp/patches/_discuss/thread/36675011/e98b/attachment/alt-cancel-next-walk-v2.patch - ---- include/net-snmp/agent/snmp_agent.h.orig 2012-10-09 22:28:58.000000000 +0000 -+++ include/net-snmp/agent/snmp_agent.h -@@ -32,6 +32,9 @@ extern "C" { - #define SNMP_MAX_PDU_SIZE 64000 /* local constraint on PDU size sent by agent - * (see also SNMP_MAX_MSG_SIZE in snmp_api.h) */ - -+#define SNMP_AGENT_FLAGS_NONE 0x0 -+#define SNMP_AGENT_FLAGS_CANCEL_IN_PROGRESS 0x1 -+ - /* - * If non-zero, causes the addresses of peers to be logged when receptions - * occur. -@@ -205,6 +208,7 @@ extern "C" { - int treecache_num; /* number of current cache entries */ - netsnmp_cachemap *cache_store; - int vbcount; -+ int flags; - } netsnmp_agent_session; - - /* -@@ -240,6 +244,7 @@ extern "C" { - int init_master_agent(void); - void shutdown_master_agent(void); - int agent_check_and_process(int block); -+ void netsnmp_check_delegated_requests(void); - void netsnmp_check_outstanding_agent_requests(void); - - int netsnmp_request_set_error(netsnmp_request_info *request, diff --git a/net/net-snmp/patches/patch-include_net-snmp_system_netbsd.h b/net/net-snmp/patches/patch-include_net-snmp_system_netbsd.h deleted file mode 100644 index 5a2e74db117..00000000000 --- a/net/net-snmp/patches/patch-include_net-snmp_system_netbsd.h +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-include_net-snmp_system_netbsd.h,v 1.1 2013/04/04 19:59:07 christos Exp $ - ---- include/net-snmp/system/netbsd.h.orig 2012-10-09 18:28:58.000000000 -0400 -+++ include/net-snmp/system/netbsd.h 2013-04-04 15:07:09.000000000 -0400 -@@ -33,6 +33,11 @@ - #define UTMP_FILE _PATH_UTMP - - #define UDP_ADDRESSES_IN_HOST_ORDER 1 -+#if __NetBSD_Version__ >= 600000000 && !defined(netbsdelf6) -+#define netbsdelf6 -+#elif __NetBSD_Version__ >= 500000000 && !defined(netbsdelf5) -+#define netbsdelf5 -+#endif - - #ifdef netbsdelf6 - #define netbsd6 -@@ -68,6 +73,13 @@ - - #if __NetBSD_Version__ >= 499005800 - #define NETBSD_STATS_VIA_SYSCTL -+ -+/* Why these undefs? */ -+#undef IPSTAT_SYMBOL -+#undef ICMPSTAT_SYMBOL -+#undef TCPSTAT_SYMBOL -+#undef UDPSTAT_SYMBOL -+ - #endif /* __NetBSD_Version__ >= 499005800 */ - - /* define the extra mib modules that are supported */ diff --git a/net/net-snmp/patches/patch-perl_ASN_Makefile.PL b/net/net-snmp/patches/patch-perl_ASN_Makefile.PL deleted file mode 100644 index 540c7e6ae4e..00000000000 --- a/net/net-snmp/patches/patch-perl_ASN_Makefile.PL +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-perl_ASN_Makefile.PL,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/ASN/Makefile.PL.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/ASN/Makefile.PL -@@ -1,3 +1,4 @@ -+package ASN; - use ExtUtils::MakeMaker; - require 5; - use Config; diff --git a/net/net-snmp/patches/patch-perl_AnyData__SNMP_Makefile.PL b/net/net-snmp/patches/patch-perl_AnyData__SNMP_Makefile.PL deleted file mode 100644 index 5498f636dd3..00000000000 --- a/net/net-snmp/patches/patch-perl_AnyData__SNMP_Makefile.PL +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-perl_AnyData__SNMP_Makefile.PL,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/AnyData_SNMP/Makefile.PL.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/AnyData_SNMP/Makefile.PL -@@ -1,3 +1,4 @@ -+package AnyData_SNMP; - use ExtUtils::MakeMaker; - # See lib/ExtUtils/MakeMaker.pm for details of how to influence - # the contents of the Makefile that is written. diff --git a/net/net-snmp/patches/patch-perl_OID_Makefile.PL b/net/net-snmp/patches/patch-perl_OID_Makefile.PL deleted file mode 100644 index fccd39bd1b3..00000000000 --- a/net/net-snmp/patches/patch-perl_OID_Makefile.PL +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-perl_OID_Makefile.PL,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/OID/Makefile.PL.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/OID/Makefile.PL -@@ -1,3 +1,4 @@ -+package OID; - # See lib/ExtUtils/MakeMaker.pm for details of how to influence - # the contents of the Makefile that is written. - diff --git a/net/net-snmp/patches/patch-perl_SNMP_Makefile.PL b/net/net-snmp/patches/patch-perl_SNMP_Makefile.PL deleted file mode 100644 index 8a3b82880a1..00000000000 --- a/net/net-snmp/patches/patch-perl_SNMP_Makefile.PL +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-perl_SNMP_Makefile.PL,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/SNMP/Makefile.PL.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/SNMP/Makefile.PL -@@ -1,3 +1,4 @@ -+package SNMP; - use ExtUtils::MakeMaker; - require 5; - use Config; diff --git a/net/net-snmp/patches/patch-perl_SNMP_SNMP.xs b/net/net-snmp/patches/patch-perl_SNMP_SNMP.xs deleted file mode 100644 index df7a8b519ec..00000000000 --- a/net/net-snmp/patches/patch-perl_SNMP_SNMP.xs +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-perl_SNMP_SNMP.xs,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/SNMP/SNMP.xs.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/SNMP/SNMP.xs -@@ -16,6 +16,10 @@ - #include "perl.h" - #include "XSUB.h" - -+#ifdef U64TYPE -+#define U64 U64pairU32 -+#endif -+ - #include <net-snmp/net-snmp-config.h> - #include <net-snmp/net-snmp-includes.h> - #include <sys/types.h> diff --git a/net/net-snmp/patches/patch-perl_TrapReceiver_Makefile.PL b/net/net-snmp/patches/patch-perl_TrapReceiver_Makefile.PL deleted file mode 100644 index 4bfc3381323..00000000000 --- a/net/net-snmp/patches/patch-perl_TrapReceiver_Makefile.PL +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-perl_TrapReceiver_Makefile.PL,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/TrapReceiver/Makefile.PL.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/TrapReceiver/Makefile.PL -@@ -1,3 +1,4 @@ -+package TrapReceiver; - use ExtUtils::MakeMaker; - require 5; - use Config; diff --git a/net/net-snmp/patches/patch-perl_TrapReceiver_TrapReceiver.xs b/net/net-snmp/patches/patch-perl_TrapReceiver_TrapReceiver.xs deleted file mode 100644 index eb870d41dc7..00000000000 --- a/net/net-snmp/patches/patch-perl_TrapReceiver_TrapReceiver.xs +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-perl_TrapReceiver_TrapReceiver.xs,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/TrapReceiver/TrapReceiver.xs.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/TrapReceiver/TrapReceiver.xs -@@ -9,6 +9,10 @@ - - #include "ppport.h" - -+#ifdef U64TYPE -+#define U64 U64pairU32 -+#endif -+ - #include <net-snmp/net-snmp-config.h> - #include <net-snmp/net-snmp-includes.h> - #include <net-snmp/agent/net-snmp-agent-includes.h> diff --git a/net/net-snmp/patches/patch-perl_agent_Makefile.PL b/net/net-snmp/patches/patch-perl_agent_Makefile.PL deleted file mode 100644 index d2cbd638209..00000000000 --- a/net/net-snmp/patches/patch-perl_agent_Makefile.PL +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-perl_agent_Makefile.PL,v 1.2 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/agent/Makefile.PL.orig 2016-06-06 13:52:38.000000000 +0000 -+++ perl/agent/Makefile.PL -@@ -1,3 +1,4 @@ -+package agent; - use ExtUtils::MakeMaker; - require 5; - use Config; diff --git a/net/net-snmp/patches/patch-perl_agent_Support_Makefile.PL b/net/net-snmp/patches/patch-perl_agent_Support_Makefile.PL deleted file mode 100644 index ec5de6003bd..00000000000 --- a/net/net-snmp/patches/patch-perl_agent_Support_Makefile.PL +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-perl_agent_Support_Makefile.PL,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/agent/Support/Makefile.PL.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/agent/Support/Makefile.PL -@@ -1,3 +1,4 @@ -+package agent_Support; - use ExtUtils::MakeMaker; - require 5; - use Config; diff --git a/net/net-snmp/patches/patch-perl_agent_agent.xs b/net/net-snmp/patches/patch-perl_agent_agent.xs deleted file mode 100644 index 17cfb76e785..00000000000 --- a/net/net-snmp/patches/patch-perl_agent_agent.xs +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-perl_agent_agent.xs,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/agent/agent.xs.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/agent/agent.xs -@@ -9,6 +9,10 @@ - #include <netdb.h> - #include <sys/socket.h> - -+#ifdef U64TYPE -+#define U64 U64pairU32 -+#endif -+ - #include <net-snmp/net-snmp-config.h> - #include <net-snmp/net-snmp-includes.h> - #include <net-snmp/agent/net-snmp-agent-includes.h> diff --git a/net/net-snmp/patches/patch-perl_agent_default__store_Makefile.PL b/net/net-snmp/patches/patch-perl_agent_default__store_Makefile.PL deleted file mode 100644 index cad28df86e9..00000000000 --- a/net/net-snmp/patches/patch-perl_agent_default__store_Makefile.PL +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-perl_agent_default__store_Makefile.PL,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/agent/default_store/Makefile.PL.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/agent/default_store/Makefile.PL -@@ -1,3 +1,4 @@ -+package agent_default_store; - use ExtUtils::MakeMaker; - require 5; - use Config; diff --git a/net/net-snmp/patches/patch-perl_default__store_Makefile.PL b/net/net-snmp/patches/patch-perl_default__store_Makefile.PL deleted file mode 100644 index ee46d9ae026..00000000000 --- a/net/net-snmp/patches/patch-perl_default__store_Makefile.PL +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-perl_default__store_Makefile.PL,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/default_store/Makefile.PL.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/default_store/Makefile.PL -@@ -1,3 +1,4 @@ -+package default_store; - use ExtUtils::MakeMaker; - require 5; - use Config; diff --git a/net/net-snmp/patches/patch-perl_manager_Makefile.PL b/net/net-snmp/patches/patch-perl_manager_Makefile.PL deleted file mode 100644 index b948cf0a82a..00000000000 --- a/net/net-snmp/patches/patch-perl_manager_Makefile.PL +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-perl_manager_Makefile.PL,v 1.1 2016/06/06 14:11:35 he Exp $ - -Adopt FreeBSD's patch to make this build with perl 5.24, ref. -https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co -https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270 -https://bugs.gentoo.org/show_bug.cgi?id=582368 - ---- perl/manager/Makefile.PL.orig 2014-12-08 20:23:22.000000000 +0000 -+++ perl/manager/Makefile.PL -@@ -1,3 +1,4 @@ -+package manager; - use ExtUtils::MakeMaker; - # See lib/ExtUtils/MakeMaker.pm for details of how to influence - # the contents of the Makefile that is written. diff --git a/net/net-snmp/patches/patch-snmplib_keytools.c b/net/net-snmp/patches/patch-snmplib_keytools.c deleted file mode 100644 index 735d270fce9..00000000000 --- a/net/net-snmp/patches/patch-snmplib_keytools.c +++ /dev/null @@ -1,56 +0,0 @@ -$NetBSD: patch-snmplib_keytools.c,v 1.1 2018/02/25 18:35:30 wiz Exp $ - -From: Andreas Henriksson <andreas@fatal.se> -Date: Sat, 23 Dec 2017 22:25:41 +0000 -Subject: [PATCH] Port OpenSSL 1.1.0 with support for 1.0.2 - -Initial support for OpenSSL 1.1.0 - -Changes by sebastian@breakpoint.cc: -- added OpenSSL 1.0.2 glue layer for backwarts compatibility -- dropped HAVE_EVP_MD_CTX_CREATE + DESTROY and added a check for OpenSSL - version instead (and currently 1.0.2 is the only one supported). - -BTS: https://bugs.debian.org/828449 -Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> ---- - apps/snmpusm.c | 43 ++++++++++++++++++++++++++++++++++++------- - configure.d/config_os_libs2 | 6 ------ - snmplib/keytools.c | 13 ++++++------- - snmplib/scapi.c | 17 +++++------------ - 4 files changed, 47 insertions(+), 32 deletions(-) - ---- snmplib/keytools.c.orig 2018-02-25 18:04:17.012838017 +0000 -+++ snmplib/keytools.c -@@ -149,13 +149,13 @@ generate_Ku(const oid * hashtype, u_int - */ - #ifdef NETSNMP_USE_OPENSSL - --#ifdef HAVE_EVP_MD_CTX_CREATE -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - ctx = EVP_MD_CTX_create(); - #else -- ctx = malloc(sizeof(*ctx)); -- if (!EVP_MD_CTX_init(ctx)) -- return SNMPERR_GENERR; -+ ctx = EVP_MD_CTX_new(); - #endif -+ if (!ctx) -+ return SNMPERR_GENERR; - #ifndef NETSNMP_DISABLE_MD5 - if (ISTRANSFORM(hashtype, HMACMD5Auth)) { - if (!EVP_DigestInit(ctx, EVP_md5())) -@@ -259,11 +259,10 @@ generate_Ku(const oid * hashtype, u_int - memset(buf, 0, sizeof(buf)); - #ifdef NETSNMP_USE_OPENSSL - if (ctx) { --#ifdef HAVE_EVP_MD_CTX_DESTROY -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - EVP_MD_CTX_destroy(ctx); - #else -- EVP_MD_CTX_cleanup(ctx); -- free(ctx); -+ EVP_MD_CTX_free(ctx); - #endif - } - #endif diff --git a/net/net-snmp/patches/patch-snmplib_scapi.c b/net/net-snmp/patches/patch-snmplib_scapi.c deleted file mode 100644 index 18f0b2339a9..00000000000 --- a/net/net-snmp/patches/patch-snmplib_scapi.c +++ /dev/null @@ -1,59 +0,0 @@ -$NetBSD: patch-snmplib_scapi.c,v 1.1 2018/02/25 18:35:30 wiz Exp $ - -From: Andreas Henriksson <andreas@fatal.se> -Date: Sat, 23 Dec 2017 22:25:41 +0000 -Subject: [PATCH] Port OpenSSL 1.1.0 with support for 1.0.2 - -Initial support for OpenSSL 1.1.0 - -Changes by sebastian@breakpoint.cc: -- added OpenSSL 1.0.2 glue layer for backwarts compatibility -- dropped HAVE_EVP_MD_CTX_CREATE + DESTROY and added a check for OpenSSL - version instead (and currently 1.0.2 is the only one supported). - -BTS: https://bugs.debian.org/828449 -Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> ---- - apps/snmpusm.c | 43 ++++++++++++++++++++++++++++++++++++------- - configure.d/config_os_libs2 | 6 ------ - snmplib/keytools.c | 13 ++++++------- - snmplib/scapi.c | 17 +++++------------ - 4 files changed, 47 insertions(+), 32 deletions(-) - ---- snmplib/scapi.c.orig 2018-02-25 18:04:17.013625332 +0000 -+++ snmplib/scapi.c -@@ -486,15 +486,10 @@ sc_hash(const oid * hashtype, size_t has - } - - /** initialize the pointer */ --#ifdef HAVE_EVP_MD_CTX_CREATE -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - cptr = EVP_MD_CTX_create(); - #else -- cptr = malloc(sizeof(*cptr)); --#if defined(OLD_DES) -- memset(cptr, 0, sizeof(*cptr)); --#else -- EVP_MD_CTX_init(cptr); --#endif -+ cptr = EVP_MD_CTX_new(); - #endif - if (!EVP_DigestInit(cptr, hashfn)) { - /* requested hash function is not available */ -@@ -507,13 +502,11 @@ sc_hash(const oid * hashtype, size_t has - /** do the final pass */ - EVP_DigestFinal(cptr, MAC, &tmp_len); - *MAC_len = tmp_len; --#ifdef HAVE_EVP_MD_CTX_DESTROY -+ -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - EVP_MD_CTX_destroy(cptr); - #else --#if !defined(OLD_DES) -- EVP_MD_CTX_cleanup(cptr); --#endif -- free(cptr); -+ EVP_MD_CTX_free(cptr); - #endif - return (rval); - diff --git a/net/net-snmp/patches/patch-snmplib_snmp__api.c b/net/net-snmp/patches/patch-snmplib_snmp__api.c deleted file mode 100644 index 37dcc7c5e3c..00000000000 --- a/net/net-snmp/patches/patch-snmplib_snmp__api.c +++ /dev/null @@ -1,124 +0,0 @@ -$NetBSD: patch-snmplib_snmp__api.c,v 1.1 2015/06/08 20:08:57 spz Exp $ - -patch from http://sourceforge.net/p/net-snmp/code/ci/f23bcd3ac6ddee5d0a48f9703007ccc738914791/ - - ---- snmplib/snmp_api.c.orig 2014-12-08 20:23:22.000000000 +0000 -+++ snmplib/snmp_api.c -@@ -4350,10 +4350,9 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char - u_char type; - u_char msg_type; - u_char *var_val; -- int badtype = 0; - size_t len; - size_t four; -- netsnmp_variable_list *vp = NULL; -+ netsnmp_variable_list *vp = NULL, *vplast = NULL; - oid objid[MAX_OID_LEN]; - u_char *p; - -@@ -4493,38 +4492,24 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char - (ASN_SEQUENCE | ASN_CONSTRUCTOR), - "varbinds"); - if (data == NULL) -- return -1; -+ goto fail; - - /* - * get each varBind sequence - */ - while ((int) *length > 0) { -- netsnmp_variable_list *vptemp; -- vptemp = (netsnmp_variable_list *) malloc(sizeof(*vptemp)); -- if (NULL == vptemp) { -- return -1; -- } -- if (NULL == vp) { -- pdu->variables = vptemp; -- } else { -- vp->next_variable = vptemp; -- } -- vp = vptemp; -+ vp = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list); -+ if (NULL == vp) -+ goto fail; - -- vp->next_variable = NULL; -- vp->val.string = NULL; - vp->name_length = MAX_OID_LEN; -- vp->name = NULL; -- vp->index = 0; -- vp->data = NULL; -- vp->dataFreeHook = NULL; - DEBUGDUMPSECTION("recv", "VarBind"); - data = snmp_parse_var_op(data, objid, &vp->name_length, &vp->type, - &vp->val_len, &var_val, length); - if (data == NULL) -- return -1; -+ goto fail; - if (snmp_set_var_objid(vp, objid, vp->name_length)) -- return -1; -+ goto fail; - - len = MAX_PACKET_LENGTH; - DEBUGDUMPHEADER("recv", "Value"); -@@ -4604,7 +4589,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char - vp->val.string = (u_char *) malloc(vp->val_len); - } - if (vp->val.string == NULL) { -- return -1; -+ goto fail; - } - p = asn_parse_string(var_val, &len, &vp->type, vp->val.string, - &vp->val_len); -@@ -4619,7 +4604,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char - vp->val_len *= sizeof(oid); - vp->val.objid = (oid *) malloc(vp->val_len); - if (vp->val.objid == NULL) { -- return -1; -+ goto fail; - } - memmove(vp->val.objid, objid, vp->val_len); - break; -@@ -4631,21 +4616,35 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char - case ASN_BIT_STR: - vp->val.bitstring = (u_char *) malloc(vp->val_len); - if (vp->val.bitstring == NULL) { -- return -1; -+ goto fail; - } -- p = asn_parse_bitstring(var_val, &len, &vp->type, -+ asn_parse_bitstring(var_val, &len, &vp->type, - vp->val.bitstring, &vp->val_len); -- if (!p) -- return -1; - break; - default: - snmp_log(LOG_ERR, "bad type returned (%x)\n", vp->type); -- badtype = -1; -+ goto fail; - break; - } - DEBUGINDENTADD(-4); -+ -+ if (NULL == vplast) { -+ pdu->variables = vp; -+ } else { -+ vplast->next_variable = vp; -+ } -+ vplast = vp; -+ vp = NULL; - } -- return badtype; -+ return 0; -+ -+fail: -+ DEBUGMSGTL(("recv", "error while parsing VarBindList\n")); -+ /** if we were parsing a var, remove it from the pdu and free it */ -+ if (vp) -+ snmp_free_var(vp); -+ -+ return -1; - } - - /* |