i think my FreeBSD bridge(4) changes are now mostly complete: github.com/freebsd/freebsd-src

summary:

- an interface's PVID can be set using 'ifconfig bridge0 ifpvid ix0 20'; any pvid other than 0 enables VLAN filtering.

- an interface's port type can be set using 'ifconfig bridge0 iftype ix0 <access|trunk|hybrid>'; the default is hybrid.

- the port's allowed VLAN list for trunk/hybrid ports can be set using ‘ifconfig bridge0 +ifvlans ix0 10,20,30,200-399', or '-ifvlans' to remove

- .1q tags are added on incoming frames and stripped on outgoing frames based on port PVID

- you can create an SVI on a bridge using 'ifconfig vlan20 create vlan 20 vlandev bridge0’ (or just 'ifconfig bridge0.20 create’)

- in theory this lets us do standards-based RSTP (rather than PVST) but i haven't tested that at all

this needs a *lot* of testing and review; i'm sure there are bugs and unhandled edge cases. my plan is to divide it into smaller chunks and submit those one at a time; so far, that's the ifconfig ifpvid option.

[edited to remove the link to a specific commit which is no longer valid]

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.bsd.cafe/users/lw/statuses/114279806220063950 on your instance and quote it. (Note that quoting is not supported in Mastodon.)