Commit 90010b36 authored by Linus Lüssing's avatar Linus Lüssing Committed by David S. Miller

bridge: rename struct bridge_mcast_query/querier

The current naming of these two structs is very random, in that
reversing their naming would not make any semantical difference.

This patch tries to make the naming less confusing by giving them a more
specific, distinguishable naming.

This is also useful for the upcoming patches reintroducing the
"struct bridge_mcast_querier" but for storing information about the
selected querier (no matter if our own or a foreign querier).
Signed-off-by: default avatarLinus Lüssing <linus.luessing@web.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c4d4c255
...@@ -418,13 +418,13 @@ static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry) ...@@ -418,13 +418,13 @@ static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry)
ip.proto = entry->addr.proto; ip.proto = entry->addr.proto;
if (ip.proto == htons(ETH_P_IP)) { if (ip.proto == htons(ETH_P_IP)) {
if (timer_pending(&br->ip4_querier.timer)) if (timer_pending(&br->ip4_other_query.timer))
return -EBUSY; return -EBUSY;
ip.u.ip4 = entry->addr.u.ip4; ip.u.ip4 = entry->addr.u.ip4;
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
} else { } else {
if (timer_pending(&br->ip6_querier.timer)) if (timer_pending(&br->ip6_other_query.timer))
return -EBUSY; return -EBUSY;
ip.u.ip6 = entry->addr.u.ip6; ip.u.ip6 = entry->addr.u.ip6;
......
This diff is collapsed.
...@@ -68,13 +68,13 @@ struct br_ip ...@@ -68,13 +68,13 @@ struct br_ip
#ifdef CONFIG_BRIDGE_IGMP_SNOOPING #ifdef CONFIG_BRIDGE_IGMP_SNOOPING
/* our own querier */ /* our own querier */
struct bridge_mcast_query { struct bridge_mcast_own_query {
struct timer_list timer; struct timer_list timer;
u32 startup_sent; u32 startup_sent;
}; };
/* other querier */ /* other querier */
struct bridge_mcast_querier { struct bridge_mcast_other_query {
struct timer_list timer; struct timer_list timer;
unsigned long delay_time; unsigned long delay_time;
}; };
...@@ -178,9 +178,9 @@ struct net_bridge_port ...@@ -178,9 +178,9 @@ struct net_bridge_port
#define BR_PROMISC 0x00000080 #define BR_PROMISC 0x00000080
#ifdef CONFIG_BRIDGE_IGMP_SNOOPING #ifdef CONFIG_BRIDGE_IGMP_SNOOPING
struct bridge_mcast_query ip4_query; struct bridge_mcast_own_query ip4_own_query;
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
struct bridge_mcast_query ip6_query; struct bridge_mcast_own_query ip6_own_query;
#endif /* IS_ENABLED(CONFIG_IPV6) */ #endif /* IS_ENABLED(CONFIG_IPV6) */
unsigned char multicast_router; unsigned char multicast_router;
struct timer_list multicast_router_timer; struct timer_list multicast_router_timer;
...@@ -282,11 +282,11 @@ struct net_bridge ...@@ -282,11 +282,11 @@ struct net_bridge
struct hlist_head router_list; struct hlist_head router_list;
struct timer_list multicast_router_timer; struct timer_list multicast_router_timer;
struct bridge_mcast_querier ip4_querier; struct bridge_mcast_other_query ip4_other_query;
struct bridge_mcast_query ip4_query; struct bridge_mcast_own_query ip4_own_query;
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
struct bridge_mcast_querier ip6_querier; struct bridge_mcast_other_query ip6_other_query;
struct bridge_mcast_query ip6_query; struct bridge_mcast_own_query ip6_own_query;
#endif /* IS_ENABLED(CONFIG_IPV6) */ #endif /* IS_ENABLED(CONFIG_IPV6) */
#endif #endif
...@@ -493,7 +493,7 @@ static inline bool br_multicast_is_router(struct net_bridge *br) ...@@ -493,7 +493,7 @@ static inline bool br_multicast_is_router(struct net_bridge *br)
static inline bool static inline bool
__br_multicast_querier_exists(struct net_bridge *br, __br_multicast_querier_exists(struct net_bridge *br,
struct bridge_mcast_querier *querier) struct bridge_mcast_other_query *querier)
{ {
return time_is_before_jiffies(querier->delay_time) && return time_is_before_jiffies(querier->delay_time) &&
(br->multicast_querier || timer_pending(&querier->timer)); (br->multicast_querier || timer_pending(&querier->timer));
...@@ -504,10 +504,10 @@ static inline bool br_multicast_querier_exists(struct net_bridge *br, ...@@ -504,10 +504,10 @@ static inline bool br_multicast_querier_exists(struct net_bridge *br,
{ {
switch (eth->h_proto) { switch (eth->h_proto) {
case (htons(ETH_P_IP)): case (htons(ETH_P_IP)):
return __br_multicast_querier_exists(br, &br->ip4_querier); return __br_multicast_querier_exists(br, &br->ip4_other_query);
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
case (htons(ETH_P_IPV6)): case (htons(ETH_P_IPV6)):
return __br_multicast_querier_exists(br, &br->ip6_querier); return __br_multicast_querier_exists(br, &br->ip6_other_query);
#endif #endif
default: default:
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment