br_multicast.c (615cc23e6283e143933ecf2bf3645fe0cea5ae6a) | br_multicast.c (1e9ca45662d6bb65fb60d3fbb7737b081d9cffc9) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Bridge multicast support. 4 * 5 * Copyright (c) 2010 Herbert Xu <herbert@gondor.apana.org.au> 6 */ 7 8#include <linux/err.h> --- 2965 unchanged lines hidden (view full) --- 2974 else 2975 hlist_add_head_rcu(rlist, mc_router_list); 2976 2977 /* For backwards compatibility for now, only notify if we 2978 * switched from no IPv4/IPv6 multicast router to a new 2979 * IPv4 or IPv6 multicast router. 2980 */ 2981 if (br_multicast_no_router_otherpf(pmctx, rlist)) { | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Bridge multicast support. 4 * 5 * Copyright (c) 2010 Herbert Xu <herbert@gondor.apana.org.au> 6 */ 7 8#include <linux/err.h> --- 2965 unchanged lines hidden (view full) --- 2974 else 2975 hlist_add_head_rcu(rlist, mc_router_list); 2976 2977 /* For backwards compatibility for now, only notify if we 2978 * switched from no IPv4/IPv6 multicast router to a new 2979 * IPv4 or IPv6 multicast router. 2980 */ 2981 if (br_multicast_no_router_otherpf(pmctx, rlist)) { |
2982 br_rtr_notify(pmctx->port->br->dev, pmctx->port, RTM_NEWMDB); | 2982 br_rtr_notify(pmctx->port->br->dev, pmctx, RTM_NEWMDB); |
2983 br_port_mc_router_state_change(pmctx->port, true); 2984 } 2985} 2986 2987/* Add port to router_list 2988 * list is maintained ordered by pointer value 2989 * and locked by br->multicast_lock and RCU 2990 */ --- 1082 unchanged lines hidden (view full) --- 4073 */ 4074 if (!hlist_unhashed(&pmctx->ip4_rlist)) 4075 return; 4076#if IS_ENABLED(CONFIG_IPV6) 4077 if (!hlist_unhashed(&pmctx->ip6_rlist)) 4078 return; 4079#endif 4080 | 2983 br_port_mc_router_state_change(pmctx->port, true); 2984 } 2985} 2986 2987/* Add port to router_list 2988 * list is maintained ordered by pointer value 2989 * and locked by br->multicast_lock and RCU 2990 */ --- 1082 unchanged lines hidden (view full) --- 4073 */ 4074 if (!hlist_unhashed(&pmctx->ip4_rlist)) 4075 return; 4076#if IS_ENABLED(CONFIG_IPV6) 4077 if (!hlist_unhashed(&pmctx->ip6_rlist)) 4078 return; 4079#endif 4080 |
4081 br_rtr_notify(pmctx->port->br->dev, pmctx->port, RTM_DELMDB); | 4081 br_rtr_notify(pmctx->port->br->dev, pmctx, RTM_DELMDB); |
4082 br_port_mc_router_state_change(pmctx->port, false); 4083 4084 /* don't allow timer refresh */ 4085 if (pmctx->multicast_router == MDB_RTR_TYPE_TEMP) 4086 pmctx->multicast_router = MDB_RTR_TYPE_TEMP_QUERY; 4087} 4088 4089int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val) --- 641 unchanged lines hidden --- | 4082 br_port_mc_router_state_change(pmctx->port, false); 4083 4084 /* don't allow timer refresh */ 4085 if (pmctx->multicast_router == MDB_RTR_TYPE_TEMP) 4086 pmctx->multicast_router = MDB_RTR_TYPE_TEMP_QUERY; 4087} 4088 4089int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val) --- 641 unchanged lines hidden --- |