net: bridge: mcast: dump ipv4 querier state
authorNikolay Aleksandrov <nikolay@nvidia.com>
Fri, 13 Aug 2021 15:00:00 +0000 (18:00 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Aug 2021 13:02:43 +0000 (14:02 +0100)
commitc7fa1d9b1fb179375e889ff076a1566ecc997bfc
treee37a7391bdc585d7573830e2e1d72e6e476a3b63
parentc3fb3698f935381161101d2479d66dd48c106183
net: bridge: mcast: dump ipv4 querier state

Add support for dumping global IPv4 querier state, we dump the state
only if our own querier is enabled or there has been another external
querier which has won the election. For the bridge global state we use
a new attribute IFLA_BR_MCAST_QUERIER_STATE and embed the state inside.
The structure is:
 [IFLA_BR_MCAST_QUERIER_STATE]
  `[BRIDGE_QUERIER_IP_ADDRESS] - ip address of the querier
  `[BRIDGE_QUERIER_IP_PORT]    - bridge port ifindex where the querier was
                                 seen (set only if external querier)
  `[BRIDGE_QUERIER_IP_OTHER_TIMER]   -  other querier timeout

Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/if_bridge.h
include/uapi/linux/if_link.h
net/bridge/br_multicast.c
net/bridge/br_netlink.c
net/bridge/br_private.h