History log of /freebsd-current/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

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


# afb001df 20-Jun-2023 John Baldwin <jhb@FreeBSD.org>

bsnmpd snmp_bridge: Remove set but unused variable.


# 8c9946be 01-Jun-2023 Elyes Haouas <ehaouas@noos.fr>

bsnmpd/modules/snmp_bridge: Fix typos

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# f8f33808 10-Feb-2020 Warner Losh <imp@FreeBSD.org>

Fix comment. It mentioned sparc64 specifically, but alignment issues
are present elsewhere.

Reivewed by: cy@, bcr@
Differential Revision: https://reviews.freebsd.org/D23593


# 8e9b3e70 03-Jul-2018 Hartmut Brandt <harti@FreeBSD.org>

Update bsnmp to version 1.13. This does not bring user-visible changes.
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.


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# 640b69be 04-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

style cleanup

- bridge_pf_dump: use nitems instead of spelling it out longhand
- bridge_do_pfctl: sort variables by alignment for type

MFC after: 1 week


# 9577c300 04-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

bridge_do_pfctl: allocate mib_name dynamically using asprintf

This is being done to reduce wasted space, simplify complexity in
the code, and to quell a Coverity warning about buffer overruns.
warning about buffer overruns.

MFC after: 1 week
Reported by: Coverity
CID: 1006736


# 758268dc 04-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

bridge_get_pfval: use nitems instead of spelling it out longhand

MFC after: 3 days


# a0cc1855 04-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

Use strlcpy instead of strcpy when copying the bridge name to ifr.ifr_name
to avoid buffer overflows

MFC after: 1 week
Reported by: Coverity
CID: 1006735, 1006737, 1006738


# 6ebc2344 27-Dec-2016 Enji Cooper <ngie@FreeBSD.org>

style(9) fixes: clean up leading whitespace

MFC after: 3 days


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

style(9): clean up trailing whitespace

MFC after: 3 weeks


# e7d939bd 06-Jul-2014 Marcel Moolenaar <marcel@FreeBSD.org>

Remove ia64.

This includes:
o All directories named *ia64*
o All files named *ia64*
o All ia64-specific code guarded by __ia64__
o All ia64-specific makefile logic
o Mention of ia64 in comments and documentation

This excludes:
o Everything under contrib/
o Everything under crypto/
o sys/xen/interface
o sys/sys/elf_common.h

Discussed at: BSDcan


# 3df5ecac 30-Dec-2011 Ulrich Spörlein <uqs@FreeBSD.org>

Spelling fixes for usr.sbin/


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 24988ed3 08-Aug-2007 Shteryana Shopova <syrinx@FreeBSD.org>

Keep the snmp_bridge(3) module up to date with if_bridge(4) and add an
object to control the value of the new 'PRIVATE' bridge members' flag.
While here, remove stale '__unused' compiler directives.

Reviewed by: bz
Approved by: re (bmah), bz (mentor)


# ffdddc92 04-Feb-2007 Shteryana Shopova <syrinx@FreeBSD.org>

Remove all #if __FreeBSD_version checks now that RSTP support has been
MFCed to RELENG_6. We no longer need that to compile the bridge module
under both RELENG_6 and CURRENT.

Approved by: bz (mentor)


# a245531a 29-Dec-2006 Bjoern A. Zeeb <bz@FreeBSD.org>

bridge_snmp.h
* Change the API of bridge_get_basemac to take a maximum buffer length.

bridge_if.c
* Adopt to new API.
* In bridge_attach_newif() remove an additional pointer to the buffer
by shuffling the code a bit. Also makes the code more readable.

bridge_sys.c
* bridge_get_basemac():
- Adopt to the new API.
- Change check for error code of getifaddrs().
- First check for sa_family != AF_LINK.
- Copy sockaddr_dl * to get around alignment constraints on some
platforms.
- Use strcmp instead of strncmp so that "foo11" != "foo1".
* other functions:
- Allocate n times of the struct we need instead of arbitrary len,
cast to the type we want it to be and pass around struct *s instead
of char *s. This gets us around alignment restrictions on some
platforms and in addition it is more clear what data is passed around.
- Name variables for same types consistently.

Reviewed by: syrinx


# 3c6bf055 20-Dec-2006 Shteryana Shopova <syrinx@FreeBSD.org>

Keep in sync with the if_bridge(4) module (rev. 1.20 if_bridgevar.h,
1.12 bridgestp.h) and rename all PointToPoint related variables
from P2P to PTP (s/P2P/PTP/g s/p2p/ptp/g).

Approved by: bz (mentor)


# f02a1e57 15-Dec-2006 Shteryana Shopova <syrinx@FreeBSD.org>

Do not add 'default:' cases inside a switch() on an enum like the
SNMP option argument. That way the compiler will give a warning in
case of a missing or an extra but unknown 'case:'.
Do the same for SNMP LEAF objects to be prepared once gensnmptree will
auto-generate enums for those too.
Add an abort() after the switch() instead of the 'default:' to catch
any errors. The nice side effect is that the compiler will correctly
track supposed to be 'uninitialized' variables with that.

When trying to set a value sanity check it before calling the OS
dependent API of snmp_bridge to tell whether it is an attempt to
set a bad value or a general error.

Suggested by: harti (first part)
Approved by: bz (mentor)


# b5906f8e 07-Dec-2006 Shteryana Shopova <syrinx@FreeBSD.org>

Add support for RSTP (RFC4318) to the SNMP bridge monitoring module.

Approved by: bz (mentor)


# 7850265e 19-Nov-2006 Shteryana Shopova <syrinx@FreeBSD.org>

Bring in a SNMP module to support monitoring if_bridge(4) interfaces
via bsnmpd(1). The module implements IETF BRIDGE-MIB as defined in
RFC4188 and a private BEGEMOT-BRIDGE-MIB.

Sponsored by: Google Summer of Code 2006
Reviewed by: bz
Approved by: bz (mentor)