net: bridge: mcast: add wrappers for router node retrieval
In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants and to avoid IPv6 #ifdef clutter later add two wrapper functions for router node retrieval in the payload forwarding code. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
ce6f709775
commit
44ebb081dc
@@ -276,7 +276,8 @@ void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
|
||||
bool allow_mode_include = true;
|
||||
struct hlist_node *rp;
|
||||
|
||||
rp = rcu_dereference(hlist_first_rcu(&br->ip4_mc_router_list));
|
||||
rp = br_multicast_get_first_rport_node(br, skb);
|
||||
|
||||
if (mdst) {
|
||||
p = rcu_dereference(mdst->ports);
|
||||
if (br_multicast_should_handle_mode(br, mdst->addr.proto) &&
|
||||
@@ -290,7 +291,7 @@ void br_multicast_flood(struct net_bridge_mdb_entry *mdst,
|
||||
struct net_bridge_port *port, *lport, *rport;
|
||||
|
||||
lport = p ? p->key.port : NULL;
|
||||
rport = hlist_entry_safe(rp, struct net_bridge_port, ip4_rlist);
|
||||
rport = br_multicast_rport_from_node_skb(rp, skb);
|
||||
|
||||
if ((unsigned long)lport > (unsigned long)rport) {
|
||||
port = lport;
|
||||
|
||||
Reference in New Issue
Block a user