On 16/10/2021 08:04, Kyungrok Chung wrote:
Make use of netdev helper functions to improve code readability. Replace 'dev->priv_flags & IFF_EBRIDGE' with netif_is_bridge_master(dev).
Signed-off-by: Kyungrok Chung acadx0@gmail.com
v1->v2:
- Apply fixes to batman-adv, core too.
net/batman-adv/multicast.c | 2 +- net/bridge/br.c | 4 ++-- net/bridge/br_fdb.c | 6 +++--- net/bridge/br_if.c | 2 +- net/bridge/br_ioctl.c | 2 +- net/bridge/br_mdb.c | 4 ++-- net/bridge/br_netfilter_hooks.c | 2 +- net/bridge/br_netlink.c | 4 ++-- net/core/rtnetlink.c | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-)
[snip]
err = br_afspec(br, p, afspec, RTM_DELLINK, &changed, NULL); diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 2dc1b209ba91..d3676666a529 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -4384,7 +4384,7 @@ static int rtnl_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb) continue;
if (br_dev != netdev_master_upper_dev_get(dev) &&
!(dev->priv_flags & IFF_EBRIDGE))
netif_is_bridge_master(dev)) continue; cops = ops; }
This looks wrong, the original check is if it's _not_ a bridge master.