aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_multicast.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge/br_multicast.c')
-rw-r--r--net/bridge/br_multicast.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 81f2389f78eb..247514793101 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -23,6 +23,7 @@
23#include <linux/skbuff.h> 23#include <linux/skbuff.h>
24#include <linux/slab.h> 24#include <linux/slab.h>
25#include <linux/timer.h> 25#include <linux/timer.h>
26#include <linux/inetdevice.h>
26#include <net/ip.h> 27#include <net/ip.h>
27#if IS_ENABLED(CONFIG_IPV6) 28#if IS_ENABLED(CONFIG_IPV6)
28#include <net/ipv6.h> 29#include <net/ipv6.h>
@@ -381,7 +382,8 @@ static struct sk_buff *br_ip4_multicast_alloc_query(struct net_bridge *br,
381 iph->frag_off = htons(IP_DF); 382 iph->frag_off = htons(IP_DF);
382 iph->ttl = 1; 383 iph->ttl = 1;
383 iph->protocol = IPPROTO_IGMP; 384 iph->protocol = IPPROTO_IGMP;
384 iph->saddr = 0; 385 iph->saddr = br->multicast_query_use_ifaddr ?
386 inet_select_addr(br->dev, 0, RT_SCOPE_LINK) : 0;
385 iph->daddr = htonl(INADDR_ALLHOSTS_GROUP); 387 iph->daddr = htonl(INADDR_ALLHOSTS_GROUP);
386 ((u8 *)&iph[1])[0] = IPOPT_RA; 388 ((u8 *)&iph[1])[0] = IPOPT_RA;
387 ((u8 *)&iph[1])[1] = 4; 389 ((u8 *)&iph[1])[1] = 4;
@@ -1618,6 +1620,7 @@ void br_multicast_init(struct net_bridge *br)
1618 1620
1619 br->multicast_router = 1; 1621 br->multicast_router = 1;
1620 br->multicast_querier = 0; 1622 br->multicast_querier = 0;
1623 br->multicast_query_use_ifaddr = 0;
1621 br->multicast_last_member_count = 2; 1624 br->multicast_last_member_count = 2;
1622 br->multicast_startup_query_count = 2; 1625 br->multicast_startup_query_count = 2;
1623 1626