summaryrefslogtreecommitdiff
path: root/target/linux/generic/pending-4.14
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2018-04-16 00:00:49 +0300
committerStijn Tintel <stijn@linux-ipv6.be>2018-04-16 00:22:57 +0300
commitec1d7b94616c392c28b8a51f1aa0c481cc6d92c8 (patch)
treef25b8ee10186d5d2677d9ad48108ae3768e3914f /target/linux/generic/pending-4.14
parent03774d28e1c12f24857cdb44a110df593cec42a6 (diff)
downloadmtk-20170518-ec1d7b94616c392c28b8a51f1aa0c481cc6d92c8.zip
mtk-20170518-ec1d7b94616c392c28b8a51f1aa0c481cc6d92c8.tar.gz
mtk-20170518-ec1d7b94616c392c28b8a51f1aa0c481cc6d92c8.tar.bz2
kernel: bump 4.14 to 4.14.34
Refresh patches. Update patches that no longer apply: - backport/313-netfilter-remove-defensive-check-on-malformed-packet.patch - pending/642-net-8021q-support-hardware-flow-table-offload.patch Compile-tested: x86/64. Runtime-tested: x86/64. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'target/linux/generic/pending-4.14')
-rw-r--r--target/linux/generic/pending-4.14/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch53
-rw-r--r--target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch7
-rw-r--r--target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch2
-rw-r--r--target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch30
-rw-r--r--target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch18
-rw-r--r--target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch2
6 files changed, 57 insertions, 55 deletions
diff --git a/target/linux/generic/pending-4.14/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch b/target/linux/generic/pending-4.14/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch
index 5835973..9311725 100644
--- a/target/linux/generic/pending-4.14/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch
+++ b/target/linux/generic/pending-4.14/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch
@@ -103,75 +103,76 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
- indev = dev_get_by_index(net, ifindex);
- if (WARN_ON(!indev))
- return 0;
-+ if (dev->type != ARPHRD_ETHER)
-+ return;
-
+-
- mutex_lock(&nf_flow_offload_hw_mutex);
- ret = indev->netdev_ops->ndo_flow_offload(type, flow);
- mutex_unlock(&nf_flow_offload_hw_mutex);
++ if (dev->type != ARPHRD_ETHER)
++ return;
+
+- dev_put(indev);
+ memcpy(path->eth_src, path->dev->dev_addr, ETH_ALEN);
+ n = dst_neigh_lookup(tuple->dst_cache, &tuple->src_v4);
+ if (!n)
+ return;
-- dev_put(indev);
+- return ret;
+ memcpy(path->eth_dest, n->ha, ETH_ALEN);
+ path->flags |= FLOW_OFFLOAD_PATH_ETHERNET;
+ neigh_release(n);
-+}
+ }
-- return ret;
+-static void flow_offload_hw_work_add(struct flow_offload_hw *offload)
+static int flow_offload_check_path(struct net *net,
+ struct flow_offload_tuple *tuple,
+ struct flow_offload_hw_path *path)
-+{
+ {
+- struct net *net;
+- int ret;
+ struct net_device *dev;
-+
+
+- if (nf_ct_is_dying(offload->ct))
+- return;
+ dev = dev_get_by_index_rcu(net, tuple->iifidx);
+ if (!dev)
+ return -ENOENT;
+
+ path->dev = dev;
+ flow_offload_check_ethernet(tuple, path);
-+
+
+- net = read_pnet(&offload->flow_hw_net);
+- ret = do_flow_offload_hw(net, offload->flow, FLOW_OFFLOAD_ADD);
+- if (ret >= 0)
+- offload->flow->flags |= FLOW_OFFLOAD_HW;
+ if (dev->netdev_ops->ndo_flow_offload_check)
+ return dev->netdev_ops->ndo_flow_offload_check(path);
+
+ return 0;
}
--static void flow_offload_hw_work_add(struct flow_offload_hw *offload)
+-static void flow_offload_hw_work_del(struct flow_offload_hw *offload)
+static int do_flow_offload_hw(struct flow_offload_hw *offload)
{
-- struct net *net;
+- struct net *net = read_pnet(&offload->flow_hw_net);
+ struct net_device *src_dev = offload->src.dev;
+ struct net_device *dest_dev = offload->dest.dev;
- int ret;
-
-- if (nf_ct_is_dying(offload->ct))
-- return;
++ int ret;
++
+ ret = src_dev->netdev_ops->ndo_flow_offload(offload->type,
+ offload->flow,
+ &offload->src,
+ &offload->dest);
-
-- net = read_pnet(&offload->flow_hw_net);
-- ret = do_flow_offload_hw(net, offload->flow, FLOW_OFFLOAD_ADD);
-- if (ret >= 0)
-- offload->flow->flags |= FLOW_OFFLOAD_HW;
++
+ /* restore devices in case the driver mangled them */
+ offload->src.dev = src_dev;
+ offload->dest.dev = dest_dev;
+
+ return ret;
- }
++}
--static void flow_offload_hw_work_del(struct flow_offload_hw *offload)
-+static void flow_offload_hw_free(struct flow_offload_hw *offload)
- {
-- struct net *net = read_pnet(&offload->flow_hw_net);
--
- do_flow_offload_hw(net, offload->flow, FLOW_OFFLOAD_DEL);
++static void flow_offload_hw_free(struct flow_offload_hw *offload)
++{
+ dev_put(offload->src.dev);
+ dev_put(offload->dest.dev);
+ if (offload->ct)
diff --git a/target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch
index cda2e0f..ca340fc 100644
--- a/target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch
+++ b/target/linux/generic/pending-4.14/642-net-8021q-support-hardware-flow-table-offload.patch
@@ -9,18 +9,19 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
-@@ -29,8 +29,10 @@
+@@ -29,9 +29,11 @@
#include <linux/net_tstamp.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
+#include <linux/netfilter.h>
+ #include <linux/phy.h>
#include <net/arp.h>
#include <net/switchdev.h>
+#include <net/netfilter/nf_flow_table.h>
#include "vlan.h"
#include "vlanproc.h"
-@@ -762,6 +764,25 @@ static int vlan_dev_get_iflink(const str
+@@ -766,6 +768,25 @@ static int vlan_dev_get_iflink(const str
return real_dev->ifindex;
}
@@ -46,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static const struct ethtool_ops vlan_ethtool_ops = {
.get_link_ksettings = vlan_ethtool_get_link_ksettings,
.get_drvinfo = vlan_ethtool_get_drvinfo,
-@@ -799,6 +820,7 @@ static const struct net_device_ops vlan_
+@@ -803,6 +824,7 @@ static const struct net_device_ops vlan_
.ndo_fix_features = vlan_dev_fix_features,
.ndo_get_lock_subclass = vlan_dev_get_lock_subclass,
.ndo_get_iflink = vlan_dev_get_iflink,
diff --git a/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch
index 9259fe8..9565412 100644
--- a/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch
+++ b/target/linux/generic/pending-4.14/644-net-pppoe-support-hardware-flow-table-offload.patch
@@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#define PPP_VERSION "2.4.2"
/*
-@@ -1383,12 +1386,33 @@ static void ppp_dev_priv_destructor(stru
+@@ -1382,12 +1385,33 @@ static void ppp_dev_priv_destructor(stru
ppp_destroy_interface(ppp);
}
diff --git a/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
index c544f7a..4a76db0 100644
--- a/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
+++ b/target/linux/generic/pending-4.14/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
@@ -143,7 +143,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
}
return &ip6n->tnls[prio][h];
}
-@@ -380,6 +391,12 @@ ip6_tnl_dev_uninit(struct net_device *de
+@@ -383,6 +394,12 @@ ip6_tnl_dev_uninit(struct net_device *de
struct net *net = t->net;
struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
@@ -156,7 +156,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (dev == ip6n->fb_tnl_dev)
RCU_INIT_POINTER(ip6n->tnls_wc[0], NULL);
else
-@@ -776,6 +793,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t,
+@@ -779,6 +796,107 @@ int ip6_tnl_rcv_ctl(struct ip6_tnl *t,
}
EXPORT_SYMBOL_GPL(ip6_tnl_rcv_ctl);
@@ -264,7 +264,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
static int __ip6_tnl_rcv(struct ip6_tnl *tunnel, struct sk_buff *skb,
const struct tnl_ptk_info *tpi,
struct metadata_dst *tun_dst,
-@@ -828,6 +946,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl
+@@ -831,6 +949,27 @@ static int __ip6_tnl_rcv(struct ip6_tnl
skb_reset_network_header(skb);
memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
@@ -292,7 +292,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
__skb_tunnel_rx(skb, tunnel->dev, tunnel->net);
err = dscp_ecn_decapsulate(tunnel, ipv6h, skb);
-@@ -959,6 +1098,7 @@ static void init_tel_txopt(struct ipv6_t
+@@ -962,6 +1101,7 @@ static void init_tel_txopt(struct ipv6_t
opt->ops.opt_nflen = 8;
}
@@ -300,7 +300,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
/**
* ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
* @t: the outgoing tunnel device
-@@ -1301,6 +1441,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1304,6 +1444,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
{
struct ip6_tnl *t = netdev_priv(dev);
struct ipv6hdr *ipv6h = ipv6_hdr(skb);
@@ -308,7 +308,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
int encap_limit = -1;
__u16 offset;
struct flowi6 fl6;
-@@ -1363,6 +1504,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1366,6 +1507,18 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL);
@@ -327,7 +327,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6))
return -1;
-@@ -1491,6 +1644,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
+@@ -1494,6 +1647,14 @@ ip6_tnl_change(struct ip6_tnl *t, const
t->parms.link = p->link;
t->parms.proto = p->proto;
t->parms.fwmark = p->fwmark;
@@ -342,7 +342,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
dst_cache_reset(&t->dst_cache);
ip6_tnl_link_config(t);
return 0;
-@@ -1529,6 +1690,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
+@@ -1532,6 +1693,7 @@ ip6_tnl_parm_from_user(struct __ip6_tnl_
p->flowinfo = u->flowinfo;
p->link = u->link;
p->proto = u->proto;
@@ -350,7 +350,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
memcpy(p->name, u->name, sizeof(u->name));
}
-@@ -1910,6 +2072,15 @@ static int ip6_tnl_validate(struct nlatt
+@@ -1913,6 +2075,15 @@ static int ip6_tnl_validate(struct nlatt
return 0;
}
@@ -366,7 +366,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
static void ip6_tnl_netlink_parms(struct nlattr *data[],
struct __ip6_tnl_parm *parms)
{
-@@ -1947,6 +2118,46 @@ static void ip6_tnl_netlink_parms(struct
+@@ -1950,6 +2121,46 @@ static void ip6_tnl_netlink_parms(struct
if (data[IFLA_IPTUN_FWMARK])
parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]);
@@ -413,7 +413,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
}
static bool ip6_tnl_netlink_encap_parms(struct nlattr *data[],
-@@ -2058,6 +2269,12 @@ static void ip6_tnl_dellink(struct net_d
+@@ -2061,6 +2272,12 @@ static void ip6_tnl_dellink(struct net_d
static size_t ip6_tnl_get_size(const struct net_device *dev)
{
@@ -426,7 +426,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
return
/* IFLA_IPTUN_LINK */
nla_total_size(4) +
-@@ -2087,6 +2304,24 @@ static size_t ip6_tnl_get_size(const str
+@@ -2090,6 +2307,24 @@ static size_t ip6_tnl_get_size(const str
nla_total_size(0) +
/* IFLA_IPTUN_FWMARK */
nla_total_size(4) +
@@ -451,7 +451,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
0;
}
-@@ -2094,6 +2329,9 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2097,6 +2332,9 @@ static int ip6_tnl_fill_info(struct sk_b
{
struct ip6_tnl *tunnel = netdev_priv(dev);
struct __ip6_tnl_parm *parm = &tunnel->parms;
@@ -461,7 +461,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) ||
-@@ -2103,9 +2341,27 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2106,9 +2344,27 @@ static int ip6_tnl_fill_info(struct sk_b
nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) ||
@@ -490,7 +490,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
-@@ -2145,6 +2401,7 @@ static const struct nla_policy ip6_tnl_p
+@@ -2148,6 +2404,7 @@ static const struct nla_policy ip6_tnl_p
[IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
[IFLA_IPTUN_COLLECT_METADATA] = { .type = NLA_FLAG },
[IFLA_IPTUN_FWMARK] = { .type = NLA_U32 },
diff --git a/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
index 3934688..1ac009b 100644
--- a/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
+++ b/target/linux/generic/pending-4.14/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
@@ -141,7 +141,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static const struct rt6_info ip6_blk_hole_entry_template = {
.dst = {
.__refcnt = ATOMIC_INIT(1),
-@@ -2038,6 +2055,11 @@ static struct rt6_info *ip6_route_info_c
+@@ -2041,6 +2058,11 @@ static struct rt6_info *ip6_route_info_c
rt->dst.output = ip6_pkt_prohibit_out;
rt->dst.input = ip6_pkt_prohibit;
break;
@@ -153,7 +153,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case RTN_THROW:
case RTN_UNREACHABLE:
default:
-@@ -2763,6 +2785,17 @@ static int ip6_pkt_prohibit_out(struct n
+@@ -2766,6 +2788,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
}
@@ -171,7 +171,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/*
* Allocate a dst for local (unicast / anycast) address.
*/
-@@ -2997,7 +3030,8 @@ static int rtm_to_fib6_config(struct sk_
+@@ -3000,7 +3033,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
@@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL)
-@@ -3487,6 +3521,9 @@ static int rt6_fill_node(struct net *net
+@@ -3490,6 +3524,9 @@ static int rt6_fill_node(struct net *net
case -EACCES:
rtm->rtm_type = RTN_PROHIBIT;
break;
@@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case -EAGAIN:
rtm->rtm_type = RTN_THROW;
break;
-@@ -3805,6 +3842,8 @@ static int ip6_route_dev_notify(struct n
+@@ -3808,6 +3845,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@@ -200,7 +200,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif
-@@ -4032,6 +4071,17 @@ static int __net_init ip6_route_net_init
+@@ -4035,6 +4074,17 @@ static int __net_init ip6_route_net_init
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true);
@@ -218,7 +218,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#endif
net->ipv6.sysctl.flush_delay = 0;
-@@ -4050,6 +4100,8 @@ out:
+@@ -4053,6 +4103,8 @@ out:
return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
@@ -227,7 +227,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry:
-@@ -4067,6 +4119,7 @@ static void __net_exit ip6_route_net_exi
+@@ -4070,6 +4122,7 @@ static void __net_exit ip6_route_net_exi
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry);
kfree(net->ipv6.ip6_blk_hole_entry);
@@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
}
-@@ -4140,6 +4193,9 @@ void __init ip6_route_init_special_entri
+@@ -4143,6 +4196,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
diff --git a/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 9ac505e..9de77df 100644
--- a/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -1739,6 +1739,8 @@ struct net_device {
+@@ -1763,6 +1763,8 @@ struct net_device {
struct netdev_hw_addr_list mc;
struct netdev_hw_addr_list dev_addrs;