summaryrefslogtreecommitdiffstats
path: root/contrib/bsnmp/lib
Commit message (Collapse)AuthorAgeFilesLines
* MFC r308490 by syrinx:emaste2018-04-101-1/+4
| | | | | | | | Reply to a snmpEngineID discovery PDU with a Report PDU as per the requirements of RFC 3414 section 4. PR: 174974 Submitted by: pguyot@kallisys.net
* MFC r315641,r315642:ngie2017-03-271-2/+4
| | | | | | | | | | | | | r315641: bsnmp: don't leak snmp_client.fd in open_client_udp(..) on connect(2) failure r315642: bsnmp: explicitly test the return value for open_client_{local,udp} in snmp_open(..) open_client_* returns -1 on failure; 0 on success. Ensure that the return value is 0 -- otherwise exit snmp_open(..).
* MFC r311263:ngie2017-02-041-3/+3
| | | | | | | | | | | | | | Use calloc instead of malloc with buffers in snmp_{recv,send}_packet This doesn't fix the issue noted in the PR, but at the very least it cleans up the error so it looks a bit more sane, and in the event that bsnmp did wander off into the weeds, the likelihood of it crashing with more sensible output is greater, in my opinion MFC counter set high so I have enough time to resolve the real underlying bug in bsnmpwalk PR: 215721
* MFC r311390:ngie2017-01-131-1/+4
| | | | | | snmp_table_fetch_async: don't leak `work` if snmp_pdu_send(..) fails CID: 1017276
* MFC r310729:ngie2017-01-131-1/+5
| | | | | | | | | | | | Prevent improper memory accesses after calling snmp_pdu_free and snmp_value_free snmp_pdu_free: set pdu->nbindings to 0 to limit the damage that could happen if a pdu was reused after calling the function, and as both stack and heap allocation types are used in contrib/bsnmp and usr.sbin/bsnmpd. snmp_value_free: NULL out value->v.octetstring.octets after calling free on it to prevent a double-free from occurring.
* MFC r310501:ngie2017-01-071-18/+7
| | | | | | | | | | | | Be more strict about IpAddress type in snmp_value_parse(..) - Use inet_pton with AF_INET instead of doing longhand with sscanf. - Use gethostbyname2 with AF_INET to ensure that the hostname isn't accidentally parsed with another address family, e.g. AF_INET6. NB: IpAddress per RFC-2578 is IPv4 only. Work is in progress to add the InetAddress type and friends documented in RFC-4001 and elsewhere (which supports IPv4, IPv6, and more).
* MFC r310931,r310942,r310988:ngie2017-01-071-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | r310931: Use strdup in snmp_parse_server(..) when possible instead of malloc+strcpy This simplifies the code and mutes a Coverity warning about sc->cport being improperly allocated CID: 1018247 r310942: Unbreak the build by passing the string to strdup, not its length Pointyhat to: ngie r310988: snmp_discover_engine: fix up req/resp (PDU object) handling a bit - Call snmp_pdu_free on req and resp when done with the objects - Call snmp_pdu_free on req before calling snmp_pdu_create on it again
* MFC r311003:ngie2017-01-041-3/+3
| | | | Fix spelling errors; bump .Dd for the change
* MFC r311001:ngie2017-01-041-1/+1
| | | | Bump .Dd for the spelling and .Nm updates
* MFC r310099,r311000,r311002:ngie2017-01-041-6/+6
| | | | | | | | | | r311000: Fix spelling errors r311002: Install bsnmpclient(3) as snmp_client_{init,set_host,set_port}(3)
* MFC r310500,r310660:ngie2016-12-312-6/+6
| | | | | | | | | | | | | | | r310500: Minor style(9) fixes - Trailing whitespace cleanup - Sort variables in snmp_dialog(..) by alignment No functional change r310660: style(9): fix whitespace in pdu_encode_secparams(..)
* MFC r310648:ngie2016-12-3116-47/+47
| | | | style(9): clean up trailing whitespace
* MFC r310662:ngie2016-12-311-3/+3
| | | | style(9): snmp_send_packet(..): fix whitespace
* MFC r310499:ngie2016-12-281-4/+4
| | | | | | Sort #includes No functional change
* MFC r310202:ngie2016-12-261-25/+25
| | | | | | Clean up trailing and leading whitespace Fix variable type alignment in snmp_dialog(..)
* Fix the function signatures when MK_CRYPT == no for snmp_get_local_keys andngie2014-12-271-2/+2
| | | | | | | snmp_passwd_to_keys MFC after: 1 week Reported by: Beeblebrox <zaphod@berentweb.com>
* Fix a problem with OBJECT IDENTIFIER encoding: need to check theharti2014-01-211-1/+1
| | | | | second subid to be less than 40, not the first when the first subid is 0 or 1.
* Fix bsnmpd remote denial of service vulnerability.delphij2014-01-141-0/+5
| | | | | | | Reported by: dinoex Submitted by: harti Security: FreeBSD-SA-14:01.bsnmpd Security: CVE-2014-1452
* Fix the -Wconversion warnings produced when compiling the SNMP agent.syrinx2013-10-171-3/+19
|
* Fix SNMP Error response PDUs and properly encode them when using v3 ↵syrinx2013-10-173-8/+49
| | | | | | auth/encryption. Reported by: harti@
* Clean some 'svn:executable' properties in the tree.pfg2013-01-261-0/+0
| | | | | Submitted by: Christoph Mallon MFC after: 3 days
* Remove end of line whitespace.joel2012-06-171-2/+2
|
* Minor mdoc fixes.joel2012-06-172-4/+1
|
* Bring in a SNMP module that allows configuration of SNMPv3 Notification targets.syrinx2010-12-207-26/+98
| | | | | | Sponsored by: The FreeBSD Foundation Reviewed by: philip Approved by: philip
* Silence the compiler warnings in libbsnmp by removing several (now)syrinx2010-12-163-21/+18
| | | | | | | unsed parameters. Sponsored by: The FreeBSD Foundation Reviewed by: philip@
* Add a forgotten file from r216294 and unbreak the build.syrinx2010-12-081-0/+404
| | | | | | Sponsored by: The FreeBSD Foundation Reviewed by: philip@ (mostly) Approved by: philip@
* In bsnmpd(1) add support for SNMPv3 message processing model, including ↵syrinx2010-12-0810-212/+1082
| | | | | | | | message authentication, packet encryption & view-based access control (RFC 3412, 3414, 3415). Sponsored by: The FreeBSD Foundation Reviewed by: philip@ (mostly) Approved by: philip@
* mdoc: drop even more redundant .Pp callsuqs2010-10-191-1/+0
| | | | | | No change in rendered output, less mandoc lint warnings. Tool provided by: Nobuyuki Koganemaru n-kogane at syd.odn.ne.jp
* mdoc: consistently spell our email addresses <foo@FreeBSD.org>uqs2010-05-244-8/+8
| | | | | Reviewed by: ru Approved by: harti
* This commit was generated by cvs2svn to compensate for changes in r156066,harti2006-02-274-23/+32
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Virgin import of bsnmpd 1.12harti2006-02-274-23/+32
| |
* | This commit was generated by cvs2svn to compensate for changes in r150974,harti2005-10-053-10/+18
|\ \ | |/ | | | | which included commits to RCS files with non-trunk default branches.
| * Vendor fix for the build problem of snmp_pf. Move the fallback definitionsharti2005-10-053-10/+18
| | | | | | | | | | for U?INT32_{MAX,MIN} from asn1.h into the .c files that actually require them (the .h file doesn't refer to these macros).
* | These files are not needed and were imported by accident in theharti2005-10-041-20/+0
|/ | | | previous import.
* Virgin import of bsnmpd 1.11harti2005-10-0410-224/+357
|
* Virgin import of bsnmpd 1.10harti2005-05-233-61/+226
|
* Virgin import of bsnmpd 1.8harti2005-02-285-31/+35
|
* Virgin import of bsnmpd 1.7harti2004-08-0615-351/+587
|
* Import of bsnmpd 1.6harti2004-04-146-104/+65
|
* Virgin import of bsnmpd 1.5aharti2004-01-2313-28/+126
|
* Virgin import of bsnmp 1.4harti2003-11-1013-0/+7257
OpenPOWER on IntegriCloud