mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-06 00:13:38 -04:00
bridge: add root port blocking
This is Linux bridge implementation of root port guard. If BPDU is received from a leaf (edge) port, it should not be elected as root port. Why would you want to do this? If using STP on a bridge and the downstream bridges are not fully trusted; this prevents a hostile guest for rerouting traffic. Why not just use netfilter? Netfilter does not track of follow spanning tree decisions. It would be difficult and error prone to try and mirror STP resolution in netfilter module. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a2e01a65cd
commit
1007dd1aa5
5 changed files with 29 additions and 2 deletions
|
@ -217,6 +217,7 @@ enum {
|
|||
IFLA_BRPORT_COST, /* " cost */
|
||||
IFLA_BRPORT_MODE, /* mode (hairpin) */
|
||||
IFLA_BRPORT_GUARD, /* bpdu guard */
|
||||
IFLA_BRPORT_PROTECT, /* root port protection */
|
||||
__IFLA_BRPORT_MAX
|
||||
};
|
||||
#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue