Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
All of the conflicts were cases of overlapping changes. In net/core/devlink.c, we have to make care that the resouce size_params have become a struct member rather than a pointer to such an object. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -412,7 +412,7 @@ static bool ip6_pkt_too_big(const struct sk_buff *skb, unsigned int mtu)
|
||||
if (skb->ignore_df)
|
||||
return false;
|
||||
|
||||
if (skb_is_gso(skb) && skb_gso_validate_mtu(skb, mtu))
|
||||
if (skb_is_gso(skb) && skb_gso_validate_network_len(skb, mtu))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@@ -1982,14 +1982,14 @@ static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev,
|
||||
{
|
||||
struct net *net = dev_net(dev);
|
||||
struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
|
||||
struct ip6_tnl *nt, *t;
|
||||
struct ip_tunnel_encap ipencap;
|
||||
struct ip6_tnl *nt, *t;
|
||||
int err;
|
||||
|
||||
nt = netdev_priv(dev);
|
||||
|
||||
if (ip6_tnl_netlink_encap_parms(data, &ipencap)) {
|
||||
int err = ip6_tnl_encap_setup(nt, &ipencap);
|
||||
|
||||
err = ip6_tnl_encap_setup(nt, &ipencap);
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
@@ -2005,7 +2005,11 @@ static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev,
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
return ip6_tnl_create2(dev);
|
||||
err = ip6_tnl_create2(dev);
|
||||
if (!err && tb[IFLA_MTU])
|
||||
ip6_tnl_change_mtu(dev, nla_get_u32(tb[IFLA_MTU]));
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int ip6_tnl_changelink(struct net_device *dev, struct nlattr *tb[],
|
||||
|
@@ -21,18 +21,19 @@
|
||||
int ip6_route_me_harder(struct net *net, struct sk_buff *skb)
|
||||
{
|
||||
const struct ipv6hdr *iph = ipv6_hdr(skb);
|
||||
struct sock *sk = sk_to_full_sk(skb->sk);
|
||||
unsigned int hh_len;
|
||||
struct dst_entry *dst;
|
||||
struct flowi6 fl6 = {
|
||||
.flowi6_oif = skb->sk ? skb->sk->sk_bound_dev_if : 0,
|
||||
.flowi6_oif = sk ? sk->sk_bound_dev_if : 0,
|
||||
.flowi6_mark = skb->mark,
|
||||
.flowi6_uid = sock_net_uid(net, skb->sk),
|
||||
.flowi6_uid = sock_net_uid(net, sk),
|
||||
.daddr = iph->daddr,
|
||||
.saddr = iph->saddr,
|
||||
};
|
||||
int err;
|
||||
|
||||
dst = ip6_route_output(net, skb->sk, &fl6);
|
||||
dst = ip6_route_output(net, sk, &fl6);
|
||||
err = dst->error;
|
||||
if (err) {
|
||||
IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES);
|
||||
@@ -50,7 +51,7 @@ int ip6_route_me_harder(struct net *net, struct sk_buff *skb)
|
||||
if (!(IP6CB(skb)->flags & IP6SKB_XFRM_TRANSFORMED) &&
|
||||
xfrm_decode_session(skb, flowi6_to_flowi(&fl6), AF_INET6) == 0) {
|
||||
skb_dst_set(skb, NULL);
|
||||
dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), skb->sk, 0);
|
||||
dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), sk, 0);
|
||||
if (IS_ERR(dst))
|
||||
return PTR_ERR(dst);
|
||||
skb_dst_set(skb, dst);
|
||||
|
@@ -48,10 +48,6 @@ static bool rpfilter_lookup_reverse6(struct net *net, const struct sk_buff *skb,
|
||||
}
|
||||
|
||||
fl6.flowi6_mark = flags & XT_RPFILTER_VALID_MARK ? skb->mark : 0;
|
||||
if ((flags & XT_RPFILTER_LOOSE) == 0) {
|
||||
fl6.flowi6_oif = dev->ifindex;
|
||||
lookup_flags |= RT6_LOOKUP_F_IFACE;
|
||||
}
|
||||
|
||||
rt = (void *)ip6_route_lookup(net, &fl6, skb, lookup_flags);
|
||||
if (rt->dst.error)
|
||||
|
@@ -178,7 +178,7 @@ static bool __nf_flow_exceeds_mtu(const struct sk_buff *skb, unsigned int mtu)
|
||||
if (skb->len <= mtu)
|
||||
return false;
|
||||
|
||||
if (skb_is_gso(skb) && skb_gso_validate_mtu(skb, mtu))
|
||||
if (skb_is_gso(skb) && skb_gso_validate_network_len(skb, mtu))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@@ -99,6 +99,10 @@ static bool nf_nat_ipv6_manip_pkt(struct sk_buff *skb,
|
||||
!l4proto->manip_pkt(skb, &nf_nat_l3proto_ipv6, iphdroff, hdroff,
|
||||
target, maniptype))
|
||||
return false;
|
||||
|
||||
/* must reload, offset might have changed */
|
||||
ipv6h = (void *)skb->data + iphdroff;
|
||||
|
||||
manip_addr:
|
||||
if (maniptype == NF_NAT_MANIP_SRC)
|
||||
ipv6h->saddr = target->src.u3.in6;
|
||||
|
@@ -180,7 +180,6 @@ void nft_fib6_eval(const struct nft_expr *expr, struct nft_regs *regs,
|
||||
}
|
||||
|
||||
*dest = 0;
|
||||
again:
|
||||
rt = (void *)ip6_route_lookup(nft_net(pkt), &fl6, pkt->skb,
|
||||
lookup_flags);
|
||||
if (rt->dst.error)
|
||||
@@ -190,15 +189,8 @@ void nft_fib6_eval(const struct nft_expr *expr, struct nft_regs *regs,
|
||||
if (rt->rt6i_flags & (RTF_REJECT | RTF_ANYCAST | RTF_LOCAL))
|
||||
goto put_rt_err;
|
||||
|
||||
if (oif && oif != rt->rt6i_idev->dev) {
|
||||
/* multipath route? Try again with F_IFACE */
|
||||
if ((lookup_flags & RT6_LOOKUP_F_IFACE) == 0) {
|
||||
lookup_flags |= RT6_LOOKUP_F_IFACE;
|
||||
fl6.flowi6_oif = oif->ifindex;
|
||||
ip6_rt_put(rt);
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
if (oif && oif != rt->rt6i_idev->dev)
|
||||
goto put_rt_err;
|
||||
|
||||
switch (priv->result) {
|
||||
case NFT_FIB_RESULT_OIF:
|
||||
|
@@ -1578,6 +1578,13 @@ static int ipip6_newlink(struct net *src_net, struct net_device *dev,
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (tb[IFLA_MTU]) {
|
||||
u32 mtu = nla_get_u32(tb[IFLA_MTU]);
|
||||
|
||||
if (mtu >= IPV6_MIN_MTU && mtu <= 0xFFF8 - dev->hard_header_len)
|
||||
dev->mtu = mtu;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IPV6_SIT_6RD
|
||||
if (ipip6_netlink_6rd_parms(data, &ip6rd))
|
||||
err = ipip6_tunnel_update_6rd(nt, &ip6rd);
|
||||
|
@@ -82,7 +82,7 @@ static int xfrm6_tunnel_check_size(struct sk_buff *skb)
|
||||
|
||||
if ((!skb_is_gso(skb) && skb->len > mtu) ||
|
||||
(skb_is_gso(skb) &&
|
||||
skb_gso_network_seglen(skb) > ip6_skb_dst_mtu(skb))) {
|
||||
!skb_gso_validate_network_len(skb, ip6_skb_dst_mtu(skb)))) {
|
||||
skb->dev = dst->dev;
|
||||
skb->protocol = htons(ETH_P_IPV6);
|
||||
|
||||
|
Reference in New Issue
Block a user