mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
A set of overlapping changes in macvlan and the rocker driver, nothing serious. Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
commit
b079115937
200 changed files with 1392 additions and 881 deletions
|
|
@ -3384,6 +3384,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
|
|||
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
|
||||
struct netdev_notifier_changeupper_info *info;
|
||||
struct inet6_dev *idev = __in6_dev_get(dev);
|
||||
struct net *net = dev_net(dev);
|
||||
int run_pending = 0;
|
||||
int err;
|
||||
|
||||
|
|
@ -3399,7 +3400,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
|
|||
case NETDEV_CHANGEMTU:
|
||||
/* if MTU under IPV6_MIN_MTU stop IPv6 on this interface. */
|
||||
if (dev->mtu < IPV6_MIN_MTU) {
|
||||
addrconf_ifdown(dev, 1);
|
||||
addrconf_ifdown(dev, dev != net->loopback_dev);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -3515,7 +3516,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
|
|||
* IPV6_MIN_MTU stop IPv6 on this interface.
|
||||
*/
|
||||
if (dev->mtu < IPV6_MIN_MTU)
|
||||
addrconf_ifdown(dev, 1);
|
||||
addrconf_ifdown(dev, dev != net->loopback_dev);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -250,8 +250,14 @@ ipv4_connected:
|
|||
*/
|
||||
|
||||
err = ip6_datagram_dst_update(sk, true);
|
||||
if (err)
|
||||
if (err) {
|
||||
/* Reset daddr and dport so that udp_v6_early_demux()
|
||||
* fails to find this socket
|
||||
*/
|
||||
memset(&sk->sk_v6_daddr, 0, sizeof(sk->sk_v6_daddr));
|
||||
inet->inet_dport = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
sk->sk_state = TCP_ESTABLISHED;
|
||||
sk_set_txhash(sk);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,25 @@
|
|||
#include <net/ipv6.h>
|
||||
#include <linux/icmpv6.h>
|
||||
|
||||
static __u16 esp6_nexthdr_esp_offset(struct ipv6hdr *ipv6_hdr, int nhlen)
|
||||
{
|
||||
int off = sizeof(struct ipv6hdr);
|
||||
struct ipv6_opt_hdr *exthdr;
|
||||
|
||||
if (likely(ipv6_hdr->nexthdr == NEXTHDR_ESP))
|
||||
return offsetof(struct ipv6hdr, nexthdr);
|
||||
|
||||
while (off < nhlen) {
|
||||
exthdr = (void *)ipv6_hdr + off;
|
||||
if (exthdr->nexthdr == NEXTHDR_ESP)
|
||||
return off;
|
||||
|
||||
off += ipv6_optlen(exthdr);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct sk_buff **esp6_gro_receive(struct sk_buff **head,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
|
|
@ -38,6 +57,7 @@ static struct sk_buff **esp6_gro_receive(struct sk_buff **head,
|
|||
struct xfrm_state *x;
|
||||
__be32 seq;
|
||||
__be32 spi;
|
||||
int nhoff;
|
||||
int err;
|
||||
|
||||
skb_pull(skb, offset);
|
||||
|
|
@ -72,6 +92,11 @@ static struct sk_buff **esp6_gro_receive(struct sk_buff **head,
|
|||
|
||||
xo->flags |= XFRM_GRO;
|
||||
|
||||
nhoff = esp6_nexthdr_esp_offset(ipv6_hdr(skb), offset);
|
||||
if (!nhoff)
|
||||
goto out;
|
||||
|
||||
IP6CB(skb)->nhoff = nhoff;
|
||||
XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL;
|
||||
XFRM_SPI_SKB_CB(skb)->family = AF_INET6;
|
||||
XFRM_SPI_SKB_CB(skb)->daddroff = offsetof(struct ipv6hdr, daddr);
|
||||
|
|
|
|||
|
|
@ -1385,7 +1385,7 @@ emsgsize:
|
|||
*/
|
||||
|
||||
cork->length += length;
|
||||
if ((((length + fragheaderlen) > mtu) ||
|
||||
if ((((length + (skb ? skb->len : headersize)) > mtu) ||
|
||||
(skb && skb_is_gso(skb))) &&
|
||||
(sk->sk_protocol == IPPROTO_UDP) &&
|
||||
(rt->dst.dev->features & NETIF_F_UFO) && !dst_xfrm(&rt->dst) &&
|
||||
|
|
|
|||
|
|
@ -3730,7 +3730,11 @@ static int ip6_route_dev_notify(struct notifier_block *this,
|
|||
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
|
||||
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
|
||||
#endif
|
||||
} else if (event == NETDEV_UNREGISTER) {
|
||||
} else if (event == NETDEV_UNREGISTER &&
|
||||
dev->reg_state != NETREG_UNREGISTERED) {
|
||||
/* NETDEV_UNREGISTER could be fired for multiple times by
|
||||
* netdev_wait_allrefs(). Make sure we only call this once.
|
||||
*/
|
||||
in6_dev_put(net->ipv6.ip6_null_entry->rt6i_idev);
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
in6_dev_put(net->ipv6.ip6_prohibit_entry->rt6i_idev);
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t,
|
|||
* we try harder to allocate.
|
||||
*/
|
||||
kp = (cmax <= 1 || capable(CAP_NET_ADMIN)) ?
|
||||
kcalloc(cmax, sizeof(*kp), GFP_KERNEL) :
|
||||
kcalloc(cmax, sizeof(*kp), GFP_KERNEL | __GFP_NOWARN) :
|
||||
NULL;
|
||||
|
||||
rcu_read_lock();
|
||||
|
|
|
|||
|
|
@ -885,7 +885,8 @@ static struct sock *__udp6_lib_demux_lookup(struct net *net,
|
|||
struct sock *sk;
|
||||
|
||||
udp_portaddr_for_each_entry_rcu(sk, &hslot2->head) {
|
||||
if (INET6_MATCH(sk, net, rmt_addr, loc_addr, ports, dif))
|
||||
if (sk->sk_state == TCP_ESTABLISHED &&
|
||||
INET6_MATCH(sk, net, rmt_addr, loc_addr, ports, dif))
|
||||
return sk;
|
||||
/* Only check first socket in chain */
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ int xfrm6_transport_finish(struct sk_buff *skb, int async)
|
|||
return 1;
|
||||
#endif
|
||||
|
||||
ipv6_hdr(skb)->payload_len = htons(skb->len);
|
||||
__skb_push(skb, skb->data - skb_network_header(skb));
|
||||
ipv6_hdr(skb)->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
|
||||
|
||||
if (xo && (xo->flags & XFRM_GRO)) {
|
||||
skb_mac_header_rebuild(skb);
|
||||
|
|
|
|||
Loading…
Reference in a new issue