Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
Version bump conflict in batman-adv, take what's in net-next. iavf conflict, adjustment of netdev_ops in net-next conflicting with poll controller method removal in net. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -4202,7 +4202,6 @@ static struct inet6_ifaddr *if6_get_first(struct seq_file *seq, loff_t pos)
|
||||
p++;
|
||||
continue;
|
||||
}
|
||||
state->offset++;
|
||||
return ifa;
|
||||
}
|
||||
|
||||
@@ -4226,13 +4225,12 @@ static struct inet6_ifaddr *if6_get_next(struct seq_file *seq,
|
||||
return ifa;
|
||||
}
|
||||
|
||||
state->offset = 0;
|
||||
while (++state->bucket < IN6_ADDR_HSIZE) {
|
||||
state->offset = 0;
|
||||
hlist_for_each_entry_rcu(ifa,
|
||||
&inet6_addr_lst[state->bucket], addr_lst) {
|
||||
if (!net_eq(dev_net(ifa->idev->dev), net))
|
||||
continue;
|
||||
state->offset++;
|
||||
return ifa;
|
||||
}
|
||||
}
|
||||
|
@@ -1234,7 +1234,7 @@ static inline int
|
||||
ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct ip6_tnl *t = netdev_priv(dev);
|
||||
const struct iphdr *iph = ip_hdr(skb);
|
||||
const struct iphdr *iph;
|
||||
int encap_limit = -1;
|
||||
struct flowi6 fl6;
|
||||
__u8 dsfield;
|
||||
@@ -1242,6 +1242,11 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
u8 tproto;
|
||||
int err;
|
||||
|
||||
/* ensure we can access the full inner ip header */
|
||||
if (!pskb_may_pull(skb, sizeof(struct iphdr)))
|
||||
return -1;
|
||||
|
||||
iph = ip_hdr(skb);
|
||||
memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
|
||||
|
||||
tproto = READ_ONCE(t->parms.proto);
|
||||
@@ -1306,7 +1311,7 @@ static inline int
|
||||
ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct ip6_tnl *t = netdev_priv(dev);
|
||||
struct ipv6hdr *ipv6h = ipv6_hdr(skb);
|
||||
struct ipv6hdr *ipv6h;
|
||||
int encap_limit = -1;
|
||||
__u16 offset;
|
||||
struct flowi6 fl6;
|
||||
@@ -1315,6 +1320,10 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
u8 tproto;
|
||||
int err;
|
||||
|
||||
if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h))))
|
||||
return -1;
|
||||
|
||||
ipv6h = ipv6_hdr(skb);
|
||||
tproto = READ_ONCE(t->parms.proto);
|
||||
if ((tproto != IPPROTO_IPV6 && tproto != 0) ||
|
||||
ip6_tnl_addr_conflict(t, ipv6h))
|
||||
|
@@ -364,11 +364,14 @@ EXPORT_SYMBOL(ip6_dst_alloc);
|
||||
|
||||
static void ip6_dst_destroy(struct dst_entry *dst)
|
||||
{
|
||||
struct dst_metrics *p = (struct dst_metrics *)DST_METRICS_PTR(dst);
|
||||
struct rt6_info *rt = (struct rt6_info *)dst;
|
||||
struct fib6_info *from;
|
||||
struct inet6_dev *idev;
|
||||
|
||||
dst_destroy_metrics_generic(dst);
|
||||
if (p != &dst_default_metrics && refcount_dec_and_test(&p->refcnt))
|
||||
kfree(p);
|
||||
|
||||
rt6_uncached_list_del(rt);
|
||||
|
||||
idev = rt->rt6i_idev;
|
||||
@@ -976,6 +979,10 @@ static void rt6_set_from(struct rt6_info *rt, struct fib6_info *from)
|
||||
rt->rt6i_flags &= ~RTF_EXPIRES;
|
||||
rcu_assign_pointer(rt->from, from);
|
||||
dst_init_metrics(&rt->dst, from->fib6_metrics->metrics, true);
|
||||
if (from->fib6_metrics != &dst_default_metrics) {
|
||||
rt->dst._metrics |= DST_METRICS_REFCOUNTED;
|
||||
refcount_inc(&from->fib6_metrics->refcnt);
|
||||
}
|
||||
}
|
||||
|
||||
/* Caller must already hold reference to @ort */
|
||||
|
Reference in New Issue
Block a user