| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Sponsored by: Netflix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang 16 introduced a warning about single bit bitfields in structs,
which is triggered by a declaration in bsnmp's snmpd.h:
contrib/bsnmp/snmpd/trans_lsock.c:271:21: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
peer->input.stream = 1;
^ ~
Signed one-bit bitfields can only have values -1 and 0, but the intent
here is to use the field as a boolean, so make it unsigned.
MFC after: 3 days
|
|
|
|
| |
Bring the contact info in sync with the contact info at IANA.
|
| |
|
|
|
|
|
|
|
|
| |
Use mib-2 throughout the files where applicable
PR: 254231
Reported by: Michael Proto
Reviewed by: bz (at) FreeBSD (dot) org
|
|
|
|
|
|
| |
Using IPFRAGTTL define was never correct, as it was measured in
PR_SLOWTIMO intervals. The sysctl returns seconds, just what
ipReasmTimeout is.
|
|
|
|
|
|
|
|
| |
Reviewed by: harti, rew
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
X-NetApp-PR: #72
Differential Revision: https://reviews.freebsd.org/D34550
|
|
|
|
|
|
| |
- s/responce/response/
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
RFC 3414 Section 4. Discovery specifies that a discovery request message has a
varBindList left empty. Nonetheless, bsnmpd(1) should not crash when receiving
a non-zero var-bindings list in a Discovery Request message.
PR: 255214
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 89e3d5671ba13dceca272d5b159c9bd805f3f504.
As pointed out, there are several problems with that commit:
1. The new semantics, while useful for clients where multiple
threads use separate contexts, breaks clients which correctly
share a single one
2. Change in semantics would require a library version bump
3. It doesn't build with GCC
|
|
|
|
|
|
|
| |
Reviewed By: harti
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D27336
|
|
|
|
|
|
|
|
|
|
|
|
| |
"recipte" should be spelled like "receipt".
.Dd is intentionally not being bumped for the change.
MFC after: 1 week
Sponsored by: DellEMC
Notes:
svn path=/head/; revision=367399
|
|
|
|
|
|
|
|
|
|
| |
The code that sets up msghdr must first fully fill in the msghdr
itself, and only then use CMSG_xxx() macros.
Silence from: harti, one week
Notes:
svn path=/head/; revision=360138
|
|\
| |
| |
| | |
Notes:
svn path=/head/; revision=359512
|
| |
| |
| |
| | |
Notes:
svn path=/vendor/bsnmp/dist/; revision=186357
|
| |
| |
| |
| | |
Notes:
svn path=/head/; revision=355697
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
config option.
An address is already in network byte order, there is no need to do
htonl().
PR: 242056
MFC after: 1 week
Notes:
svn path=/head/; revision=354858
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Summary:
The ?: operator has a lower precedence than == and &&, so the result will always
be recorded as true. Found by gcc8.
Reviewed by: ngie, ae
Differential Revision: https://reviews.freebsd.org/D22427
Notes:
svn path=/head/; revision=354834
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
admbugs: 780
Submitted by: Guido Vranken, bz
Reported by: Guido Vranken
Security: CVE-2019-5610
Notes:
svn path=/head/; revision=350635
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
bsnmpclient(3).
snmp_parse_server() function accepts string where some fields can be
omitted: [trans::][community@][server][:port]
"trans" field can be "udp", "udp6", "dgram" and "stream".
"community" can be empty string, if it is omitted, the default value
will be used. For read_community it is "public", for write_comminity
it is "private". "server" field can be hostname, IPv4 address or IPv6
address. IPv6 address should be specified in brackets "[]".
If port is omitted, the default value "snmp" will be used for "udp"
and "udp6" transports. So, now for bsnmpget(1) and bsnmwalk(1) it is
not required to specify all fields in argument of '-s' option. E.g.
# bsnmpget -s 127.1 sysName.0
# bsnmpget -s "udp::127.1" sysName.0
# bsnmpget -s "udp::public@127.1" sysName.0
# bsnmpget -s "udp::public@127.1:161" sysName.0
# bsnmpget -s "udp::[::1]" sysName.0
# bsnmpget -s "udp6::[::1]" sysName.0
# bsnmpget -s "[fe80::1%lo0]" sysName.0
PR: 236664
Reported by: olivier
MFC after: 1 month
Notes:
svn path=/head/; revision=345843
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PR: 157015
Obtained from: Yandex LLC
MFC after: 1 month
Notes:
svn path=/head/; revision=345798
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds a new table begemotSnmpdTransInetTable that uses the
InetAddressType textual convention and can be used to create listening
ports for IPv4, IPv6, zoned IPv6 and based on DNS names. It also supports
future extension beyond UDP by adding a protocol identifier to the table
index. In order to support this gensnmptree had to be modified.
Submitted by: harti
MFC after: 1 month
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D16654
Notes:
svn path=/head/; revision=345797
|
| |
| |
| |
| |
| |
| |
| |
| | |
PR: 236930
MFC after: 1 week
Notes:
svn path=/head/; revision=345763
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
mibif_reset_hc_timer(). Multiplication by 10 is erroneous
and is probably a blind copy and paste from next function.
PR: 132993
Submitted by: Vitezslav Novy <vnovy vnovy.net>
Notes:
svn path=/head/; revision=342877
|
| |
| |
| |
| | |
Notes:
svn path=/projects/openssl111/; revision=338769
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* correctly prepare a buffer to obtain interface description from a kernel and
truncate long description instead of dropping it altogether and
spamming logs;
* skip calling strlen() for each description and each SNMP request
for MIB-II/ifXTable's ifAlias.
* teach bsnmpd to allocate memory dynamically for interface descriptions
to decrease memory usage for common case and not to break
if long description occurs;
PR: 217763
Reviewed by: harti and others
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D16459
Notes:
svn path=/head/; revision=338013
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For developers gensnmptree can now generate functions for enums to convert
between enums and strings and to check the validity of a value.
The sources in FreeBSD are now in sync with the upstream which allows to
bring in IPv6 modifications.
Notes:
svn path=/head/; revision=335885
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
output, from this:
strnlen, strlen, strlen,(3) - find length of string │·······
... to this:
strlen, strnlen(3) - find length of string
PR: 223525
MFC after: 2 weeks
Notes:
svn path=/head/; revision=332642
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While Arcnet has some continued deployment in industrial controls, the
lack of drivers for any of the PCI, USB, or PCIe NICs on the market
suggests such users aren't running FreeBSD.
Evidence in the PR database suggests that the cm(4) driver (our sole
Arcnet NIC) was broken in 5.0 and has not worked since.
PR: 182297
Reviewed by: jhibbits, vangyzen
Relnotes: yes
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15057
Notes:
svn path=/head/; revision=332490
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
index(3) function declaration.
Reported by: lwhsu
MFC after: 2 weeks
Notes:
svn path=/head/; revision=328171
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
different access rights.
By default there are two community strings with index 1 and 2, one for
read-only access and second for read-write access:
begemotSnmpdCommunityString.0.1 = $(read)
begemotSnmpdCommunityString.0.2 = $(write)
Now it is possible to define additional community strings using different
indexes:
begemotSnmpdCommunityString.0.3 = "SomeString1"
begemotSnmpdCommunityPermission.0.3 = 1
begemotSnmpdCommunityString.0.4 = "SomeString2"
begemotSnmpdCommunityPermission.0.4 = 2
begemotSnmpdCommunityString.0.5 = "SomeString3"
begemotSnmpdCommunityString.0.6 = "SomeString4"
New attribute begemotSnmpdCommunityPermission can be used to specify access
rights: 1 means "read-only" access, 2 means "read-write" access. If
attribute is not specified for some index this means "read-only" rights.
Community strings must be unique, i.e. must not be the same for different
indexes.
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D13785
Notes:
svn path=/head/; revision=328160
|
| |
| |
| |
| |
| |
| |
| | |
MFC after: 1 week
Notes:
svn path=/head/; revision=326510
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a painful change, but it is needed. On the one hand, we avoid
modifying them, and this slows down some ideas, on the other hand we still
eventually modify them and tools like netstat(1) never work on next version of
FreeBSD. We maintain a ton of spares in them, and we already got some ifdef
hell at the end of tcpcb.
Details:
- Hide struct inpcb, struct tcpcb under _KERNEL || _WANT_FOO.
- Make struct xinpcb, struct xtcpcb pure API structures, not including
kernel structures inpcb and tcpcb inside. Export into these structures
the fields from inpcb and tcpcb that are known to be used, and put there
a ton of spare space.
- Make kernel and userland utilities compilable after these changes.
- Bump __FreeBSD_version.
Reviewed by: rrs, gnn
Differential Revision: D10018
Notes:
svn path=/head/; revision=315662
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
snmp_open(..)
open_client_* returns -1 on failure; 0 on success. Ensure that the return value is
0 -- otherwise exit snmp_open(..).
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=315642
|
| |
| |
| |
| |
| |
| |
| |
| | |
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=315641
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
out of order addresses
Move `port->transport` initialization before the TAILQ_FOREACH(..) loop
to ensure that the value is properly initialized before it's inserted
into the TAILQ.
MFC after: 1 week
PR: 217760
Submitted by: eugen
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=315206
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
to a non-wildcard address. As documented in ip(4), doing sendmsg(2) with
IP_SENDSRCADDR on a socket that is bound to non-wildcard address is
completely different to using this control message on a wildcard one.
A fix is to add a bool to mark whether we did setsockopt(IP_RECVDSTADDR)
on the socket, and use IP_SENDSRCADDR control message only if we did.
While here, garbage collect absolutely useless udp_recv() function that
establishes some structures on stack to never use them later.
Notes:
svn path=/head/; revision=312331
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There haven't been any changes to the MIB definition, so the REVISION
remains static at the version it was imported at
MFC after: 1 week
Notes:
svn path=/head/; revision=311760
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There haven't been any changes to the MIB definition, so the REVISION
remains static at the version it was imported at
MFC after: 1 week
Notes:
svn path=/head/; revision=311759
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
when dereferencing a NULL pointer later on.
Choose to just check for the NULL pointer in the next for-loop for now to fix
the issue with a minimal amount of code churn
sys/queue.h use here would make more sense than using a static table
MFC after: 5 days
Notes:
svn path=/head/; revision=311757
|
| |
| |
| |
| |
| |
| |
| | |
MFC after: 5 days
Notes:
svn path=/head/; revision=311754
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This avoids a segfault with malformed or unanticipated files,
like IPV6-TC.txt (a file containing just TEXTUAL-CONVENTIONS).
MFC after: 5 days
Found with: gensnmpdef /usr/local/share/snmp/mibs/IPV6-TC.txt
Notes:
svn path=/head/; revision=311750
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There haven't been any changes to the MIB definition, so the REVISION
remains static at the version it was imported at
MFC after: 1 week
Notes:
svn path=/head/; revision=311742
|
| |
| |
| |
| |
| |
| |
| | |
MFC after: 3 days
Notes:
svn path=/head/; revision=311733
|
| |
| |
| |
| |
| |
| |
| | |
MFC after: 3 days
Notes:
svn path=/head/; revision=311505
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add an XXX comment to note that the conditional seems suspect given
how it's handled elsewhere in the SNMP_OP_SET case.
MFC after: 2 weeks
Reported by: Coverity
CID: 1008573
Notes:
svn path=/head/; revision=311394
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MFC after: 1 week
Reported by: Coverity
CID: 1017276
Notes:
svn path=/head/; revision=311390
|
| |
| |
| |
| |
| |
| |
| | |
MFC after: 3 days
Notes:
svn path=/head/; revision=311384
|
| |
| |
| |
| |
| |
| |
| | |
MFC after: 3 days
Notes:
svn path=/head/; revision=311382
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Use strlcpy to ensure p->name doesn't overflow sa.sun_path [*].
- Use SUN_LEN(..) instead of spelling out calculation longhand (inspired
by comment by jmallett).
Tested with: dgram and stream support with both bsnmpwalk and snmpwalk
MFC after: 1 week
Reported by: Coverity
CID: 1006825
Notes:
svn path=/head/; revision=311381
|