OSDN Git Service

net: bridge: sync fdb to new unicast-filtering ports
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 2 Jul 2021 12:07:36 +0000 (14:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Jul 2021 20:34:07 +0000 (13:34 -0700)
commita019abd8022061b917da767cd1a66ed823724eab
tree33abc066b4cba8e9328dc210567f0102778aaa12
parent81b4a0cc7565b08cadd0d02bae3434f127d1d72a
net: bridge: sync fdb to new unicast-filtering ports

Since commit 2796d0c648c9 ("bridge: Automatically manage
port promiscuous mode.")
bridges with `vlan_filtering 1` and only 1 auto-port don't
set IFF_PROMISC for unicast-filtering-capable ports.

Normally on port changes `br_manage_promisc` is called to
update the promisc flags and unicast filters if necessary,
but it cannot distinguish between *new* ports and ones
losing their promisc flag, and new ports end up not
receiving the MAC address list.

Fix this by calling `br_fdb_sync_static` in `br_add_if`
after the port promisc flags are updated and the unicast
filter was supposed to have been filled.

Fixes: 2796d0c648c9 ("bridge: Automatically manage port promiscuous mode.")
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_if.c