History log of /freebsd/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 44836e32 17-Jul-2025 Gleb Smirnoff <glebius@FreeBSD.org>

bsnmpget: print SNMP library reported error on failures

Reviewed by: syrinx, harti
Differential Revision: https://reviews.freebsd.org/D51073


Revision tags: release/14.3.0-p1, release/14.2.0-p4, release/13.5.0-p2, release/14.3.0, release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3
# f021e357 10-Jan-2025 Shteryana Shopova <syrinx@FreeBSD.org>

bsnmpwalk: Fix crash on invalid data

PR: 258570
Reported by: Robert Morris <rtm@lcs.mit.edu>
Reviewed by: emaste, markj
Differential Revision: https://reviews.freebsd.org/D48422


Revision tags: release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0
# 91b95f3d 04-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r311132 through r311305.


# 30dcd18b 03-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

Swap parameters around with parse_syntax_strval(..) for consistency with
other parse_* APIs in bsnmp*

MFC after: 3 days
Noted by: bz


# 570afb92 01-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

Call snmp_pdu_free on req/resp with a consistent, correct pattern

- snmp_pdu_free should be called before snmp_pdu_create is called
again
- snmp_pdu_free should be called on the resp to snmp_dialo

Call snmp_pdu_free on req/resp with a consistent, correct pattern

- snmp_pdu_free should be called before snmp_pdu_create is called
again
- snmp_pdu_free should be called on the resp to snmp_dialog when
successful

Tested with the following bsnmp commands:

% export SNMPUSER=bsnmp SNMPPASSWD=bsnmptest
% SNMP_ARGS="-A proto=sha -C context='' -K -P proto=des -v 3 -r 0"
% bsnmpset $SNMP_ARGS sysLocation="MyAgent"
% bsnmpget $SNMP_ARGS sysLocation
% bsnmpwalk $SNMP_ARGS

MFC after: 12 days
X-MFC with: r310729, r310892, r310894

show more ...


# 1b135e4f 31-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

snmp_pdu_free the right object at the right time in snmptool_walk

r310892 was on the right track, but unfortunately it was resolving
the problem incorrectly and accidentally leaking memory in the
pr

snmp_pdu_free the right object at the right time in snmptool_walk

r310892 was on the right track, but unfortunately it was resolving
the problem incorrectly and accidentally leaking memory in the
process.

- Call snmp_pdu_free on req before calling snmp_pdu_create on it
at the bottom of the outer while loop
- Call snmp_pdu_free on resp after calling snmpwalk_nextpdu_create
in the inner loop

MFC after: 12 days
X-MFC with: r310729, r310892
Reported by: valgrind

show more ...


# bcf52557 31-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

Don't call snmp_pdu_free(..) until finished with the pdu and when ready to
allocate a new one via snmp_pdu_create(..)

This fixes bsnmpwalk, so it no longer crashes after r310729

X-MFC with: r310729

Don't call snmp_pdu_free(..) until finished with the pdu and when ready to
allocate a new one via snmp_pdu_create(..)

This fixes bsnmpwalk, so it no longer crashes after r310729

X-MFC with: r310729
MFC after: 12 days

show more ...


# e1d581b2 28-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

style(9): clean up trailing whitespace

MFC after: 3 weeks


# 7c933da6 24-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

Warning message cleanup

- Use warn instead of warnx + strerror(errno)
- Remove unnecessary trailing newline from a warnx call
- Add missing spaces following "," in syslog and warn* calls

MFC after:

Warning message cleanup

- Use warn instead of warnx + strerror(errno)
- Remove unnecessary trailing newline from a warnx call
- Add missing spaces following "," in syslog and warn* calls

MFC after: 2 weeks

show more ...


# f16a380f 18-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

Clean up parse_ip(..)

- Clean up trailing whitespace
- Fix variable alignment

MFC after: 1 week


Revision tags: release/11.0.1, release/11.0.0
# 19ffd5ec 15-May-2016 Enji Cooper <ngie@FreeBSD.org>

Mute sign compare warning by casting rc to u_int to match nbindings' type

rc cannot be negative -- that was already tested for earlier on in
the function

MFC after: 1 week
Reported by: clang, gcc
S

Mute sign compare warning by casting rc to u_int to match nbindings' type

rc cannot be negative -- that was already tested for earlier on in
the function

MFC after: 1 week
Reported by: clang, gcc
Sponsored by: EMC / Isilon Storage Division

show more ...


Revision tags: release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0
# 38f1b189 26-Apr-2012 Peter Grehan <grehan@FreeBSD.org>

IFC @ r234692

sys/amd64/include/cpufunc.h
sys/amd64/include/fpu.h
sys/amd64/amd64/fpu.c
sys/amd64/vmm/vmm.c

- Add API to allow vmm FPU state init/save/restore.

FP stuff discussed with: kib


Revision tags: release/8.3.0_cvs, release/8.3.0
# 8fa0b743 23-Jan-2012 Xin LI <delphij@FreeBSD.org>

IFC @230489 (pending review).


# b9288caa 10-Jan-2012 Shteryana Shopova <syrinx@FreeBSD.org>

Implement an option to execute SNMP walks using GETBULK requests in bsnmpwalk(1)
retrieving multiple values with a Single PDU.

Reviewed by: philip@
Tested by: tsanand129 (at) gmail (dot) com


# 80dbff4e 04-Jan-2012 Sean Bruno <sbruno@FreeBSD.org>

IFC to head to catch up the bhyve branch

Approved by: grehan@


Revision tags: release/9.0.0
# 3df5ecac 30-Dec-2011 Ulrich Spörlein <uqs@FreeBSD.org>

Spelling fixes for usr.sbin/


Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0
# 6d4b9715 09-Dec-2010 Dimitry Andric <dim@FreeBSD.org>

Sync: merge r216133 through r216338 from ^/head.


# a7398723 08-Dec-2010 Shteryana Shopova <syrinx@FreeBSD.org>

Add bsnmpd(1)'s SNMP client tools (including SNMPv3 support) to the base system.

Sponsored by: The FreeBSD Foundation (the SNMPv3 bits), Google Summer of Code 2005
Reviewed by: philip@ (mostly)

Add bsnmpd(1)'s SNMP client tools (including SNMPv3 support) to the base system.

Sponsored by: The FreeBSD Foundation (the SNMPv3 bits), Google Summer of Code 2005
Reviewed by: philip@ (mostly), bz@ (earlier version based on p4 ch124545)
Approved by: philip@

show more ...