OSDN Git Service

net: bridge: shorten ageing time on topology change
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Sat, 10 Dec 2016 18:44:29 +0000 (13:44 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Dec 2016 02:28:28 +0000 (21:28 -0500)
commit34d8acd8aabb6e070b6fb718909db80458ef32ec
tree1fc8f50b8590b7d90e898a3d95da56fced30aad5
parent8384b5f5b293389a42cc65bfca2d767d15809aa1
net: bridge: shorten ageing time on topology change

802.1D [1] specifies that the bridges must use a short value to age out
dynamic entries in the Filtering Database for a period, once a topology
change has been communicated by the root bridge.

Add a bridge_ageing_time member in the net_bridge structure to store the
bridge ageing time value configured by the user (ioctl/netlink/sysfs).

If we are using in-kernel STP, shorten the ageing time value to twice
the forward delay used by the topology when the topology change flag is
set. When the flag is cleared, restore the configured ageing time.

[1] "8.3.5 Notifying topology changes ",
    http://profesores.elo.utfsm.cl/~agv/elo309/doc/802.1D-1998.pdf

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_device.c
net/bridge/br_private.h
net/bridge/br_stp.c