diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2014-10-27 22:55:39 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2014-10-27 22:55:39 +0000 |
commit | 2644af4717cf9cc3cf89564ca017f596a7dcad05 (patch) | |
tree | 7f2121f700446e60159a365094fdc6eea16d5cb7 /target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch | |
parent | 5e558fcd48c8c4acb87fe7bcf3eb2a66bb279503 (diff) | |
download | upstream-2644af4717cf9cc3cf89564ca017f596a7dcad05.tar.gz upstream-2644af4717cf9cc3cf89564ca017f596a7dcad05.tar.bz2 upstream-2644af4717cf9cc3cf89564ca017f596a7dcad05.zip |
kernel: make the kernel 3.18 patches apply and boot on arm.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43095 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch')
-rw-r--r-- | target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch | 100 |
1 files changed, 49 insertions, 51 deletions
diff --git a/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch b/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch index a9612f0559..97a7f7f8de 100644 --- a/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch +++ b/target/linux/generic/patches-3.18/645-bridge_multicast_to_unicast.patch @@ -1,6 +1,6 @@ --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c -@@ -634,7 +634,8 @@ struct net_bridge_port_group *br_multica +@@ -635,7 +635,8 @@ struct net_bridge_port_group *br_multica struct net_bridge_port *port, struct br_ip *group, struct net_bridge_port_group __rcu *next, @@ -10,7 +10,7 @@ { struct net_bridge_port_group *p; -@@ -649,12 +650,33 @@ struct net_bridge_port_group *br_multica +@@ -650,12 +651,33 @@ struct net_bridge_port_group *br_multica hlist_add_head(&p->mglist, &port->mglist); setup_timer(&p->timer, br_multicast_port_group_expired, (unsigned long)p); @@ -45,7 +45,7 @@ { struct net_bridge_mdb_entry *mp; struct net_bridge_port_group *p; -@@ -681,13 +703,13 @@ static int br_multicast_add_group(struct +@@ -682,13 +704,13 @@ static int br_multicast_add_group(struct for (pp = &mp->ports; (p = mlock_dereference(*pp, br)) != NULL; pp = &p->next) { @@ -61,7 +61,7 @@ if (unlikely(!p)) goto err; rcu_assign_pointer(*pp, p); -@@ -706,7 +728,7 @@ err: +@@ -707,7 +729,7 @@ err: static int br_ip4_multicast_add_group(struct net_bridge *br, struct net_bridge_port *port, __be32 group, @@ -70,7 +70,7 @@ { struct br_ip br_group; -@@ -717,14 +739,14 @@ static int br_ip4_multicast_add_group(st +@@ -718,14 +740,14 @@ static int br_ip4_multicast_add_group(st br_group.proto = htons(ETH_P_IP); br_group.vid = vid; @@ -87,7 +87,7 @@ { struct br_ip br_group; -@@ -735,7 +757,7 @@ 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; @@ -96,7 +96,7 @@ } #endif -@@ -950,6 +972,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) { @@ -104,7 +104,7 @@ struct igmpv3_report *ih; struct igmpv3_grec *grec; int i; -@@ -993,7 +1016,7 @@ static int br_ip4_multicast_igmp3_report +@@ -1009,7 +1032,7 @@ static int br_ip4_multicast_igmp3_report continue; } @@ -113,7 +113,7 @@ if (err) break; } -@@ -1007,6 +1030,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) { @@ -121,7 +121,7 @@ struct icmp6hdr *icmp6h; struct mld2_grec *grec; int i; -@@ -1055,7 +1079,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, @@ -130,17 +130,17 @@ if (!err) break; } -@@ -1319,7 +1343,8 @@ static void br_multicast_leave_group(str - struct net_bridge_port *port, - struct br_ip *group, - struct bridge_mcast_querier *querier, -- struct bridge_mcast_query *query) -+ struct bridge_mcast_query *query, -+ const unsigned char *src) +@@ -1408,7 +1432,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 bridge_mcast_own_query *own_query) ++ struct bridge_mcast_own_query *own_query, ++ const unsigned char *src) { struct net_bridge_mdb_htable *mdb; struct net_bridge_mdb_entry *mp; -@@ -1369,7 +1394,7 @@ static void br_multicast_leave_group(str +@@ -1458,7 +1483,7 @@ br_multicast_leave_group(struct net_brid for (pp = &mp->ports; (p = mlock_dereference(*pp, br)) != NULL; pp = &p->next) { @@ -149,7 +149,7 @@ continue; rcu_assign_pointer(*pp, p->next); -@@ -1403,7 +1428,7 @@ static void br_multicast_leave_group(str +@@ -1492,7 +1517,7 @@ br_multicast_leave_group(struct net_brid for (p = mlock_dereference(mp->ports, br); p != NULL; p = mlock_dereference(p->next, br)) { @@ -158,7 +158,7 @@ continue; if (!hlist_unhashed(&p->mglist) && -@@ -1421,8 +1446,8 @@ out: +@@ -1510,8 +1535,8 @@ out: static void br_ip4_multicast_leave_group(struct net_bridge *br, struct net_bridge_port *port, @@ -168,14 +168,13 @@ + const unsigned char *src) { struct br_ip br_group; - struct bridge_mcast_query *query = port ? &port->ip4_query : -@@ -1435,14 +1460,15 @@ static void br_ip4_multicast_leave_group - br_group.proto = htons(ETH_P_IP); + struct bridge_mcast_own_query *own_query; +@@ -1526,14 +1551,14 @@ static void br_ip4_multicast_leave_group br_group.vid = vid; -- br_multicast_leave_group(br, port, &br_group, &br->ip4_querier, query); -+ br_multicast_leave_group(br, port, &br_group, &br->ip4_querier, query, -+ src); + br_multicast_leave_group(br, port, &br_group, &br->ip4_other_query, +- own_query); ++ own_query, src); } #if IS_ENABLED(CONFIG_IPV6) @@ -186,18 +185,17 @@ + __u16 vid, const unsigned char *src) { struct br_ip br_group; - struct bridge_mcast_query *query = port ? &port->ip6_query : -@@ -1456,7 +1482,8 @@ static void br_ip6_multicast_leave_group - br_group.proto = htons(ETH_P_IPV6); + struct bridge_mcast_own_query *own_query; +@@ -1548,7 +1573,7 @@ static void br_ip6_multicast_leave_group br_group.vid = vid; -- br_multicast_leave_group(br, port, &br_group, &br->ip6_querier, query); -+ br_multicast_leave_group(br, port, &br_group, &br->ip6_querier, query, -+ src); + br_multicast_leave_group(br, port, &br_group, &br->ip6_other_query, +- own_query); ++ own_query, src); } #endif -@@ -1465,6 +1492,7 @@ static int br_multicast_ipv4_rcv(struct +@@ -1557,6 +1582,7 @@ static int br_multicast_ipv4_rcv(struct struct sk_buff *skb, u16 vid) { @@ -205,7 +203,7 @@ struct sk_buff *skb2 = skb; const struct iphdr *iph; struct igmphdr *ih; -@@ -1538,7 +1566,7 @@ static int br_multicast_ipv4_rcv(struct +@@ -1630,7 +1656,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 +212,7 @@ break; case IGMPV3_HOST_MEMBERSHIP_REPORT: err = br_ip4_multicast_igmp3_report(br, port, skb2, vid); -@@ -1547,7 +1575,7 @@ static int br_multicast_ipv4_rcv(struct +@@ -1639,7 +1665,7 @@ static int br_multicast_ipv4_rcv(struct err = br_ip4_multicast_query(br, port, skb2, vid); break; case IGMP_HOST_LEAVE_MESSAGE: @@ -223,7 +221,7 @@ break; } -@@ -1565,6 +1593,7 @@ static int br_multicast_ipv6_rcv(struct +@@ -1657,6 +1683,7 @@ static int br_multicast_ipv6_rcv(struct struct sk_buff *skb, u16 vid) { @@ -231,7 +229,7 @@ struct sk_buff *skb2; const struct ipv6hdr *ip6h; u8 icmp6_type; -@@ -1674,7 +1703,8 @@ static int br_multicast_ipv6_rcv(struct +@@ -1766,7 +1793,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 +239,7 @@ break; } case ICMPV6_MLD2_REPORT: -@@ -1691,7 +1721,7 @@ static int br_multicast_ipv6_rcv(struct +@@ -1783,7 +1811,7 @@ static int br_multicast_ipv6_rcv(struct goto out; } mld = (struct mld_msg *)skb_transport_header(skb2); @@ -252,7 +250,7 @@ --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h -@@ -116,6 +116,9 @@ struct net_bridge_port_group { +@@ -112,6 +112,9 @@ struct net_bridge_port_group { struct timer_list timer; struct br_ip addr; unsigned char state; @@ -262,15 +260,15 @@ }; struct net_bridge_mdb_entry -@@ -175,6 +178,7 @@ struct net_bridge_port - #define BR_LEARNING 0x00000020 - #define BR_FLOOD 0x00000040 - #define BR_ISOLATE_MODE 0x00000080 -+#define BR_MULTICAST_TO_UCAST 0x00000100 +@@ -173,6 +176,7 @@ struct net_bridge_port + #define BR_AUTO_MASK (BR_FLOOD | BR_LEARNING) + #define BR_PROMISC 0x00000080 + #define BR_ISOLATE_MODE 0x00000100 ++#define BR_MULTICAST_TO_UCAST 0x00000200 #ifdef CONFIG_BRIDGE_IGMP_SNOOPING - struct bridge_mcast_query ip4_query; -@@ -468,7 +472,8 @@ void br_multicast_free_pg(struct rcu_hea + struct bridge_mcast_own_query ip4_own_query; +@@ -485,7 +489,8 @@ void br_multicast_free_pg(struct rcu_hea struct net_bridge_port_group * br_multicast_new_port_group(struct net_bridge_port *port, struct br_ip *group, struct net_bridge_port_group __rcu *next, @@ -293,7 +291,7 @@ rcu_assign_pointer(*pp, p); --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c -@@ -170,6 +170,29 @@ out: +@@ -167,6 +167,29 @@ out: return p; } @@ -323,7 +321,7 @@ /* called under bridge lock */ static void br_flood(struct net_bridge *br, struct sk_buff *skb, struct sk_buff *skb0, -@@ -234,6 +257,7 @@ static void br_multicast_flood(struct ne +@@ -231,6 +254,7 @@ static void br_multicast_flood(struct ne struct net_bridge_port *prev = NULL; struct net_bridge_port_group *p; struct hlist_node *rp; @@ -331,7 +329,7 @@ rp = rcu_dereference(hlist_first_rcu(&br->router_list)); p = mdst ? rcu_dereference(mdst->ports) : NULL; -@@ -244,10 +268,19 @@ static void br_multicast_flood(struct ne +@@ -241,10 +265,19 @@ static void br_multicast_flood(struct ne rport = rp ? hlist_entry(rp, struct net_bridge_port, rlist) : NULL; @@ -357,7 +355,7 @@ --- a/net/bridge/br_sysfs_if.c +++ b/net/bridge/br_sysfs_if.c -@@ -192,6 +192,7 @@ static BRPORT_ATTR(multicast_router, S_I +@@ -202,6 +202,7 @@ static BRPORT_ATTR(multicast_router, S_I store_multicast_router); BRPORT_ATTR_FLAG(multicast_fast_leave, BR_MULTICAST_FAST_LEAVE); @@ -365,7 +363,7 @@ #endif static const struct brport_attribute *brport_attrs[] = { -@@ -218,6 +219,7 @@ static const struct brport_attribute *br +@@ -228,6 +229,7 @@ static const struct brport_attribute *br #ifdef CONFIG_BRIDGE_IGMP_SNOOPING &brport_attr_multicast_router, &brport_attr_multicast_fast_leave, |