• Mike Manning's avatar
    bridge: support binding vlan dev link state to vlan member bridge ports · 9c0ec2e7
    Mike Manning authored
    In the case of vlan filtering on bridges, the bridge may also have the
    corresponding vlan devices as upper devices. A vlan bridge binding mode
    is added to allow the link state of the vlan device to track only the
    state of the subset of bridge ports that are also members of the vlan,
    rather than that of all bridge ports. This mode is set with a vlan flag
    rather than a bridge sysfs so that the 8021q module is aware that it
    should not set the link state for the vlan device.
    
    If bridge vlan is configured, the bridge device event handling results
    in the link state for an upper device being set, if it is a vlan device
    with the vlan bridge binding mode enabled. This also sets a
    vlan_bridge_binding flag so that subsequent UP/DOWN/CHANGE events for
    the ports in that bridge result in a link state update of the vlan
    device if required.
    
    The link state of the vlan device is up if there is at least one bridge
    port that is a vlan member that is admin & oper up, otherwise its oper
    state is IF_OPER_LOWERLAYERDOWN.
    Signed-off-by: default avatarMike Manning <mmanning@vyatta.att-mail.com>
    Acked-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9c0ec2e7
br.c 8.7 KB