aboutsummaryrefslogtreecommitdiff
path: root/lib/libifconfig/libifconfig_bridge.c
Commit message (Collapse)AuthorAgeFilesLines
* bridge: Add a vlanfilter bridge optionLexi Winter33 hours1-0/+12
| | | | | | | | | | | | | | | | | vlanfilter was originally a per-interface flag to allow more flexible configurations where some interfaces had VLAN filtering enabled and some didn't. In practice, this just makes the configuration more confusing without any real benefit, so remove it, and make vlanfilter a bridge flag instead. Add a new bridge option "defuntagged", which sets the automatically assigned PVID for new members. If set to 0 (the default) then no PVID is assigned, which matches the current behaviour. While here, add some more atf_checks to the bridge VLAN tests to make debugging easier. Differential Revision: https://reviews.freebsd.org/D51600
* bridge: add per-interface vlan access listLexi Winter2025-07-051-16/+38
| | | | | | | | | | | | | | | | | | | | The new ifconfig options 'tagged', '+tagged' and '-tagged' allow the vlan access list of a bridge interface to be configured: - Incoming tagged frames will be dropped if the vlan tag isn't in the interface's access list. - Outgoing frames will be dropped if the vlan tag isn't in the interface's access list (e.g., for BUM traffic). This has no effect if vlan filtering is not enabled on the interface. Since we now add a tag to untagged frames at ingress, remove the vlan argument from bridge_vfilter_out() and use VLANTAGOF instead. Reviewed by: des, kp, adrian Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50503
* libifconfig: Fix bridge status member listMichael Gmelin2023-12-211-1/+1
| | | | | | | | | | | | | | | When this functionality was moved to libifconfig in 3dfbda3401abea84da9, the end of list calculation was modified for unknown reasons, practically limiting the number of bridge member returned to (about) 102. This patch changes the calculation back to what it was originally and adds a unit test to verify it works as expected. Reported by: Patrick M. Hausen (via ML) Reviewed by: kp Approved by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43135
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* libifconfig: Add function to get bridge statusRyan Moeller2020-07-011-0/+142
The new function operates similarly to ifconfig_lagg_get_lagg_status and likewise is accompanied by a function to free the bridge status data structure. I have included in this patch the relocation of some strings describing STP parameters and the PV2ID macro from ifconfig into net/if_bridgevar.h as they are useful for consumers of libifconfig. Reviewed by: kp, melifaro, mmacy Approved by: mmacy (mentor) MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D25460 Notes: svn path=/head/; revision=362824