kernel: disable multicast-to-unicast translation for ipv6 neighbor solicitation (#17625)

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

Backport of r43736

git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@43737 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2014-12-17 12:29:04 +00:00
parent f55b59adaa
commit 293a26f301
1 changed files with 20 additions and 17 deletions

View File

@ -87,16 +87,19 @@
{
struct br_ip br_group;
@@ -735,7 +757,7 @@ static int br_ip6_multicast_add_group(st
@@ -735,7 +757,10 @@ static int br_ip6_multicast_add_group(st
br_group.proto = htons(ETH_P_IPV6);
br_group.vid = vid;
- return br_multicast_add_group(br, port, &br_group);
+ if (ipv6_addr_is_solict_mult(group))
+ src = NULL;
+
+ return br_multicast_add_group(br, port, &br_group, src);
}
#endif
@@ -949,6 +971,7 @@ static int br_ip4_multicast_igmp3_report
@@ -949,6 +974,7 @@ static int br_ip4_multicast_igmp3_report
struct net_bridge_port *port,
struct sk_buff *skb)
{
@ -104,7 +107,7 @@
struct igmpv3_report *ih;
struct igmpv3_grec *grec;
int i;
@@ -994,7 +1017,7 @@ static int br_ip4_multicast_igmp3_report
@@ -994,7 +1020,7 @@ static int br_ip4_multicast_igmp3_report
continue;
}
@ -113,7 +116,7 @@
if (err)
break;
}
@@ -1007,6 +1030,7 @@ static int br_ip6_multicast_mld2_report(
@@ -1007,6 +1033,7 @@ static int br_ip6_multicast_mld2_report(
struct net_bridge_port *port,
struct sk_buff *skb)
{
@ -121,7 +124,7 @@
struct icmp6hdr *icmp6h;
struct mld2_grec *grec;
int i;
@@ -1057,7 +1081,7 @@ static int br_ip6_multicast_mld2_report(
@@ -1057,7 +1084,7 @@ static int br_ip6_multicast_mld2_report(
}
err = br_ip6_multicast_add_group(br, port, &grec->grec_mca,
@ -130,7 +133,7 @@
if (!err)
break;
}
@@ -1302,7 +1326,8 @@ static void br_multicast_leave_group(str
@@ -1302,7 +1329,8 @@ static void br_multicast_leave_group(str
struct net_bridge_port *port,
struct br_ip *group,
struct bridge_mcast_querier *querier,
@ -140,7 +143,7 @@
{
struct net_bridge_mdb_htable *mdb;
struct net_bridge_mdb_entry *mp;
@@ -1352,7 +1377,7 @@ static void br_multicast_leave_group(str
@@ -1352,7 +1380,7 @@ static void br_multicast_leave_group(str
for (pp = &mp->ports;
(p = mlock_dereference(*pp, br)) != NULL;
pp = &p->next) {
@ -149,7 +152,7 @@
continue;
rcu_assign_pointer(*pp, p->next);
@@ -1386,7 +1411,7 @@ static void br_multicast_leave_group(str
@@ -1386,7 +1414,7 @@ static void br_multicast_leave_group(str
for (p = mlock_dereference(mp->ports, br);
p != NULL;
p = mlock_dereference(p->next, br)) {
@ -158,7 +161,7 @@
continue;
if (!hlist_unhashed(&p->mglist) &&
@@ -1404,8 +1429,8 @@ out:
@@ -1404,8 +1432,8 @@ out:
static void br_ip4_multicast_leave_group(struct net_bridge *br,
struct net_bridge_port *port,
@ -169,7 +172,7 @@
{
struct br_ip br_group;
struct bridge_mcast_query *query = port ? &port->ip4_query :
@@ -1418,14 +1443,15 @@ static void br_ip4_multicast_leave_group
@@ -1418,14 +1446,15 @@ static void br_ip4_multicast_leave_group
br_group.proto = htons(ETH_P_IP);
br_group.vid = vid;
@ -187,7 +190,7 @@
{
struct br_ip br_group;
struct bridge_mcast_query *query = port ? &port->ip6_query :
@@ -1439,7 +1465,8 @@ static void br_ip6_multicast_leave_group
@@ -1439,7 +1468,8 @@ static void br_ip6_multicast_leave_group
br_group.proto = htons(ETH_P_IPV6);
br_group.vid = vid;
@ -197,7 +200,7 @@
}
#endif
@@ -1447,6 +1474,7 @@ static int br_multicast_ipv4_rcv(struct
@@ -1447,6 +1477,7 @@ static int br_multicast_ipv4_rcv(struct
struct net_bridge_port *port,
struct sk_buff *skb)
{
@ -205,7 +208,7 @@
struct sk_buff *skb2 = skb;
const struct iphdr *iph;
struct igmphdr *ih;
@@ -1522,7 +1550,7 @@ static int br_multicast_ipv4_rcv(struct
@@ -1522,7 +1553,7 @@ static int br_multicast_ipv4_rcv(struct
case IGMP_HOST_MEMBERSHIP_REPORT:
case IGMPV2_HOST_MEMBERSHIP_REPORT:
BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
@ -214,7 +217,7 @@
break;
case IGMPV3_HOST_MEMBERSHIP_REPORT:
err = br_ip4_multicast_igmp3_report(br, port, skb2);
@@ -1531,7 +1559,7 @@ static int br_multicast_ipv4_rcv(struct
@@ -1531,7 +1562,7 @@ static int br_multicast_ipv4_rcv(struct
err = br_ip4_multicast_query(br, port, skb2);
break;
case IGMP_HOST_LEAVE_MESSAGE:
@ -223,7 +226,7 @@
break;
}
@@ -1548,6 +1576,7 @@ static int br_multicast_ipv6_rcv(struct
@@ -1548,6 +1579,7 @@ static int br_multicast_ipv6_rcv(struct
struct net_bridge_port *port,
struct sk_buff *skb)
{
@ -231,7 +234,7 @@
struct sk_buff *skb2;
const struct ipv6hdr *ip6h;
u8 icmp6_type;
@@ -1659,7 +1688,8 @@ static int br_multicast_ipv6_rcv(struct
@@ -1659,7 +1691,8 @@ static int br_multicast_ipv6_rcv(struct
}
mld = (struct mld_msg *)skb_transport_header(skb2);
BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
@ -241,7 +244,7 @@
break;
}
case ICMPV6_MLD2_REPORT:
@@ -1676,7 +1706,7 @@ static int br_multicast_ipv6_rcv(struct
@@ -1676,7 +1709,7 @@ static int br_multicast_ipv6_rcv(struct
goto out;
}
mld = (struct mld_msg *)skb_transport_header(skb2);