summaryrefslogtreecommitdiffstats
path: root/contrib/bsnmp/lib/snmp.c
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* MFstable/11 r310909:ngie2016-12-311-2/+2
| | | | | | | | | | | | | | | | | MFC r310500,r310660: 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(..)
* MFstable/11 r310901:ngie2016-12-311-4/+4
| | | | | | MFC r310648: style(9): clean up trailing whitespace
* MFstable/11 r310672:ngie2016-12-281-4/+4
| | | | | | | | MFC r310499: Sort #includes No functional change
* MFC r256678,r256680,r260986,r272878,r286402:ngie2016-06-081-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | r256678 (by syrinx): Fix SNMP Error response PDUs and properly encode them when using v3 auth/encryption. r256680 (by syrinx): Fix the -Wconversion warnings produced when compiling the SNMP agent. r260986 (by harti): Fix a problem with OBJECT IDENTIFIER encoding: need to check the second subid to be less than 40, not the first when the first subid is 0 or 1. r272878 (by syrinx): Fix a bug in decoding string indexes in snmp_target(3), thus causing bsnmpd(1) to not send v3 notifications properly; while here add two missing return statements which could lead to abort() in case of a rollback r286402 (by araujo): Fix variable 'old' is used uninitialized whenever '&&' condition is false. Spotted by clang.
* Bring in a SNMP module that allows configuration of SNMPv3 Notification targets.syrinx2010-12-201-10/+7
| | | | | | Sponsored by: The FreeBSD Foundation Reviewed by: philip Approved by: philip
* Silence the compiler warnings in libbsnmp by removing several (now)syrinx2010-12-161-4/+4
| | | | | | | unsed parameters. Sponsored by: The FreeBSD Foundation Reviewed by: philip@
* In bsnmpd(1) add support for SNMPv3 message processing model, including ↵syrinx2010-12-081-90/+461
| | | | | | | | message authentication, packet encryption & view-based access control (RFC 3412, 3414, 3415). Sponsored by: The FreeBSD Foundation Reviewed by: philip@ (mostly) Approved by: philip@
* Virgin import of bsnmpd 1.11harti2005-10-041-1/+5
|
* Virgin import of bsnmpd 1.7harti2004-08-061-26/+22
|
* Virgin import of bsnmpd 1.5aharti2004-01-231-1/+59
|
* Virgin import of bsnmp 1.4harti2003-11-101-0/+1027
OpenPOWER on IntegriCloud