• Joachim Wiberg's avatar
    net: bridge: add support for host l2 mdb entries · e65693b0
    Joachim Wiberg authored
    This patch expands on the earlier work on layer-2 mdb entries by adding
    support for host entries.  Due to the fact that host joined entries do
    not have any flag field, we infer the permanent flag when reporting the
    entries to userspace, which otherwise would be listed as 'temp'.
    
    Before patch:
    
        ~# bridge mdb add dev br0 port br0 grp 01:00:00:c0:ff:ee permanent
        Error: bridge: Flags are not allowed for host groups.
        ~# bridge mdb add dev br0 port br0 grp 01:00:00:c0:ff:ee
        Error: bridge: Only permanent L2 entries allowed.
    
    After patch:
    
        ~# bridge mdb add dev br0 port br0 grp 01:00:00:c0:ff:ee permanent
        ~# bridge mdb show
        dev br0 port br0 grp 01:00:00:c0:ff:ee permanent vid 1
    Signed-off-by: default avatarJoachim Wiberg <troglobit@gmail.com>
    Acked-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    e65693b0
br_mdb.c 28.2 KB