Revert "kernel: disable multicast-to-unicast translation for ipv6 neighbor solicitati...
authorFelix Fietkau <nbd@openwrt.org>
Tue, 25 Aug 2015 07:25:10 +0000 (07:25 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 25 Aug 2015 07:25:10 +0000 (07:25 +0000)
This reverts commit a080e8e1943156168913d0353a2e99d1151102aa.

It did not fix the problem but just hid some symptom. The real issue was
that IGMP/MLD report suppression was not considered for the
multicast-to-unicast feature. A recent netifd which isolates IGMP/MLD
reports between STAs by utilizing AP-isolation and bridge-hairpinning
should have fixed this.

It is perfectly fine to apply multicast-to-unicast to IPv6 Neighbor
Solicitations, too (once that feature is configured correctly).

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 46720

target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch
target/linux/generic/patches-4.1/645-bridge_multicast_to_unicast.patch

index 00ad14f113ef9d08de351b241e7958354947ef1b..e8be1fd985b49dec00f99e317526955559df1499 100644 (file)
  {
        struct br_ip br_group;
  
-@@ -736,7 +758,10 @@ static int br_ip6_multicast_add_group(st
+@@ -736,7 +758,7 @@ 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
  
-@@ -965,6 +990,7 @@ static int br_ip4_multicast_igmp3_report
+@@ -965,6 +987,7 @@ static int br_ip4_multicast_igmp3_report
                                         struct sk_buff *skb,
                                         u16 vid)
  {
        struct igmpv3_report *ih;
        struct igmpv3_grec *grec;
        int i;
-@@ -1008,7 +1034,7 @@ static int br_ip4_multicast_igmp3_report
+@@ -1008,7 +1031,7 @@ static int br_ip4_multicast_igmp3_report
                        continue;
                }
  
                if (err)
                        break;
        }
-@@ -1022,6 +1048,7 @@ static int br_ip6_multicast_mld2_report(
+@@ -1022,6 +1045,7 @@ static int br_ip6_multicast_mld2_report(
                                        struct sk_buff *skb,
                                        u16 vid)
  {
        struct icmp6hdr *icmp6h;
        struct mld2_grec *grec;
        int i;
-@@ -1070,7 +1097,7 @@ static int br_ip6_multicast_mld2_report(
+@@ -1070,7 +1094,7 @@ static int br_ip6_multicast_mld2_report(
                }
  
                err = br_ip6_multicast_add_group(br, port, &grec->grec_mca,
                if (err)
                        break;
        }
-@@ -1406,7 +1433,8 @@ br_multicast_leave_group(struct net_brid
+@@ -1407,7 +1431,8 @@ br_multicast_leave_group(struct net_brid
                         struct net_bridge_port *port,
                         struct br_ip *group,
                         struct bridge_mcast_other_query *other_query,
  {
        struct net_bridge_mdb_htable *mdb;
        struct net_bridge_mdb_entry *mp;
-@@ -1456,7 +1484,7 @@ br_multicast_leave_group(struct net_brid
+@@ -1457,7 +1482,7 @@ br_multicast_leave_group(struct net_brid
                for (pp = &mp->ports;
                     (p = mlock_dereference(*pp, br)) != NULL;
                     pp = &p->next) {
                                continue;
  
                        rcu_assign_pointer(*pp, p->next);
-@@ -1490,7 +1518,7 @@ br_multicast_leave_group(struct net_brid
+@@ -1491,7 +1516,7 @@ br_multicast_leave_group(struct net_brid
        for (p = mlock_dereference(mp->ports, br);
             p != NULL;
             p = mlock_dereference(p->next, br)) {
                        continue;
  
                if (!hlist_unhashed(&p->mglist) &&
-@@ -1508,8 +1536,8 @@ out:
+@@ -1509,8 +1534,8 @@ out:
  
  static void br_ip4_multicast_leave_group(struct net_bridge *br,
                                         struct net_bridge_port *port,
  {
        struct br_ip br_group;
        struct bridge_mcast_own_query *own_query;
-@@ -1524,14 +1552,14 @@ static void br_ip4_multicast_leave_group
+@@ -1525,14 +1550,14 @@ static void br_ip4_multicast_leave_group
        br_group.vid = vid;
  
        br_multicast_leave_group(br, port, &br_group, &br->ip4_other_query,
  {
        struct br_ip br_group;
        struct bridge_mcast_own_query *own_query;
-@@ -1546,7 +1574,7 @@ static void br_ip6_multicast_leave_group
+@@ -1547,7 +1572,7 @@ static void br_ip6_multicast_leave_group
        br_group.vid = vid;
  
        br_multicast_leave_group(br, port, &br_group, &br->ip6_other_query,
  }
  #endif
  
-@@ -1555,6 +1583,7 @@ static int br_multicast_ipv4_rcv(struct
+@@ -1556,6 +1581,7 @@ static int br_multicast_ipv4_rcv(struct
                                 struct sk_buff *skb,
                                 u16 vid)
  {
        struct sk_buff *skb2 = skb;
        const struct iphdr *iph;
        struct igmphdr *ih;
-@@ -1628,7 +1657,7 @@ static int br_multicast_ipv4_rcv(struct
+@@ -1629,7 +1655,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;
                break;
        case IGMPV3_HOST_MEMBERSHIP_REPORT:
                err = br_ip4_multicast_igmp3_report(br, port, skb2, vid);
-@@ -1637,7 +1666,7 @@ static int br_multicast_ipv4_rcv(struct
+@@ -1638,7 +1664,7 @@ static int br_multicast_ipv4_rcv(struct
                err = br_ip4_multicast_query(br, port, skb2, vid);
                break;
        case IGMP_HOST_LEAVE_MESSAGE:
                break;
        }
  
-@@ -1655,6 +1684,7 @@ static int br_multicast_ipv6_rcv(struct
+@@ -1656,6 +1682,7 @@ static int br_multicast_ipv6_rcv(struct
                                 struct sk_buff *skb,
                                 u16 vid)
  {
        struct sk_buff *skb2;
        const struct ipv6hdr *ip6h;
        u8 icmp6_type;
-@@ -1764,7 +1794,8 @@ static int br_multicast_ipv6_rcv(struct
+@@ -1765,7 +1792,8 @@ static int br_multicast_ipv6_rcv(struct
                }
                mld = (struct mld_msg *)skb_transport_header(skb2);
                BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
                break;
            }
        case ICMPV6_MLD2_REPORT:
-@@ -1781,7 +1812,7 @@ static int br_multicast_ipv6_rcv(struct
+@@ -1782,7 +1810,7 @@ static int br_multicast_ipv6_rcv(struct
                        goto out;
                }
                mld = (struct mld_msg *)skb_transport_header(skb2);
index ccdcddb973917d16460cf0ce4e114baa5d835692..2167f8f861f313423f9f7b13d5e2cd5f2b5ed8a9 100644 (file)
  {
        struct br_ip br_group;
  
-@@ -736,7 +758,10 @@ static int br_ip6_multicast_add_group(st
+@@ -736,7 +758,7 @@ 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
  
-@@ -966,6 +991,7 @@ static int br_ip4_multicast_igmp3_report
+@@ -966,6 +988,7 @@ static int br_ip4_multicast_igmp3_report
                                         struct sk_buff *skb,
                                         u16 vid)
  {
        struct igmpv3_report *ih;
        struct igmpv3_grec *grec;
        int i;
-@@ -1009,7 +1035,7 @@ static int br_ip4_multicast_igmp3_report
+@@ -1009,7 +1032,7 @@ static int br_ip4_multicast_igmp3_report
                        continue;
                }
  
                if (err)
                        break;
        }
-@@ -1023,6 +1049,7 @@ static int br_ip6_multicast_mld2_report(
+@@ -1023,6 +1046,7 @@ static int br_ip6_multicast_mld2_report(
                                        struct sk_buff *skb,
                                        u16 vid)
  {
        struct icmp6hdr *icmp6h;
        struct mld2_grec *grec;
        int i;
-@@ -1071,7 +1098,7 @@ static int br_ip6_multicast_mld2_report(
+@@ -1071,7 +1095,7 @@ static int br_ip6_multicast_mld2_report(
                }
  
                err = br_ip6_multicast_add_group(br, port, &grec->grec_mca,
                if (err)
                        break;
        }
-@@ -1407,7 +1434,8 @@ br_multicast_leave_group(struct net_brid
+@@ -1407,7 +1431,8 @@ br_multicast_leave_group(struct net_brid
                         struct net_bridge_port *port,
                         struct br_ip *group,
                         struct bridge_mcast_other_query *other_query,
  {
        struct net_bridge_mdb_htable *mdb;
        struct net_bridge_mdb_entry *mp;
-@@ -1457,7 +1485,7 @@ br_multicast_leave_group(struct net_brid
+@@ -1457,7 +1482,7 @@ br_multicast_leave_group(struct net_brid
                for (pp = &mp->ports;
                     (p = mlock_dereference(*pp, br)) != NULL;
                     pp = &p->next) {
                                continue;
  
                        rcu_assign_pointer(*pp, p->next);
-@@ -1491,7 +1519,7 @@ br_multicast_leave_group(struct net_brid
+@@ -1491,7 +1516,7 @@ br_multicast_leave_group(struct net_brid
        for (p = mlock_dereference(mp->ports, br);
             p != NULL;
             p = mlock_dereference(p->next, br)) {
                        continue;
  
                if (!hlist_unhashed(&p->mglist) &&
-@@ -1509,8 +1537,8 @@ out:
+@@ -1509,8 +1534,8 @@ out:
  
  static void br_ip4_multicast_leave_group(struct net_bridge *br,
                                         struct net_bridge_port *port,
  {
        struct br_ip br_group;
        struct bridge_mcast_own_query *own_query;
-@@ -1525,14 +1553,14 @@ static void br_ip4_multicast_leave_group
+@@ -1525,14 +1550,14 @@ static void br_ip4_multicast_leave_group
        br_group.vid = vid;
  
        br_multicast_leave_group(br, port, &br_group, &br->ip4_other_query,
  {
        struct br_ip br_group;
        struct bridge_mcast_own_query *own_query;
-@@ -1547,7 +1575,7 @@ static void br_ip6_multicast_leave_group
+@@ -1547,7 +1572,7 @@ static void br_ip6_multicast_leave_group
        br_group.vid = vid;
  
        br_multicast_leave_group(br, port, &br_group, &br->ip6_other_query,
  }
  #endif
  
-@@ -1556,6 +1584,7 @@ static int br_multicast_ipv4_rcv(struct
+@@ -1556,6 +1581,7 @@ static int br_multicast_ipv4_rcv(struct
                                 struct sk_buff *skb,
                                 u16 vid)
  {
        struct sk_buff *skb2 = skb;
        const struct iphdr *iph;
        struct igmphdr *ih;
-@@ -1629,7 +1658,7 @@ static int br_multicast_ipv4_rcv(struct
+@@ -1629,7 +1655,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;
                break;
        case IGMPV3_HOST_MEMBERSHIP_REPORT:
                err = br_ip4_multicast_igmp3_report(br, port, skb2, vid);
-@@ -1638,7 +1667,7 @@ static int br_multicast_ipv4_rcv(struct
+@@ -1638,7 +1664,7 @@ static int br_multicast_ipv4_rcv(struct
                err = br_ip4_multicast_query(br, port, skb2, vid);
                break;
        case IGMP_HOST_LEAVE_MESSAGE:
                break;
        }
  
-@@ -1656,6 +1685,7 @@ static int br_multicast_ipv6_rcv(struct
+@@ -1656,6 +1682,7 @@ static int br_multicast_ipv6_rcv(struct
                                 struct sk_buff *skb,
                                 u16 vid)
  {
        struct sk_buff *skb2;
        const struct ipv6hdr *ip6h;
        u8 icmp6_type;
-@@ -1765,7 +1795,8 @@ static int br_multicast_ipv6_rcv(struct
+@@ -1765,7 +1792,8 @@ static int br_multicast_ipv6_rcv(struct
                }
                mld = (struct mld_msg *)skb_transport_header(skb2);
                BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
                break;
            }
        case ICMPV6_MLD2_REPORT:
-@@ -1782,7 +1813,7 @@ static int br_multicast_ipv6_rcv(struct
+@@ -1782,7 +1810,7 @@ static int br_multicast_ipv6_rcv(struct
                        goto out;
                }
                mld = (struct mld_msg *)skb_transport_header(skb2);