Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Couple conflicts resolved here: 1) In the MACB driver, a bug fix to properly initialize the RX tail pointer properly overlapped with some changes to support variable sized rings. 2) In XGBE we had a "CONFIG_PM" --> "CONFIG_PM_SLEEP" fix overlapping with a reorganization of the driver to support ACPI, OF, as well as PCI variants of the chip. 3) In 'net' we had several probe error path bug fixes to the stmmac driver, meanwhile a lot of this code was cleaned up and reorganized in 'net-next'. 4) The cls_flower classifier obtained a helper function in 'net-next' called __fl_delete() and this overlapped with Daniel Borkamann's bug fix to use RCU for object destruction in 'net'. It also overlapped with Jiri's change to guard the rhashtable_remove_fast() call with a check against tc_skip_sw(). 5) In mlx4, a revert bug fix in 'net' overlapped with some unrelated changes in 'net-next'. 6) In geneve, a stale header pointer after pskb_expand_head() bug fix in 'net' overlapped with a large reorganization of the same code in 'net-next'. Since the 'net-next' code no longer had the bug in question, there was nothing to do other than to simply take the 'net-next' hunks. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -140,7 +140,8 @@ void ip6_datagram_release_cb(struct sock *sk)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ip6_datagram_release_cb);
|
||||
|
||||
static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
|
||||
int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr,
|
||||
int addr_len)
|
||||
{
|
||||
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
|
||||
struct inet_sock *inet = inet_sk(sk);
|
||||
@@ -253,6 +254,7 @@ ipv4_connected:
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__ip6_datagram_connect);
|
||||
|
||||
int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
|
||||
{
|
||||
|
@@ -418,7 +418,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
|
||||
esph = (void *)skb_push(skb, 4);
|
||||
*seqhi = esph->spi;
|
||||
esph->spi = esph->seq_no;
|
||||
esph->seq_no = htonl(XFRM_SKB_CB(skb)->seq.input.hi);
|
||||
esph->seq_no = XFRM_SKB_CB(skb)->seq.input.hi;
|
||||
aead_request_set_callback(req, 0, esp_input_done_esn, skb);
|
||||
}
|
||||
|
||||
|
@@ -448,8 +448,10 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
|
||||
|
||||
if (__ipv6_addr_needs_scope_id(addr_type))
|
||||
iif = skb->dev->ifindex;
|
||||
else
|
||||
iif = l3mdev_master_ifindex(skb_dst(skb)->dev);
|
||||
else {
|
||||
dst = skb_dst(skb);
|
||||
iif = l3mdev_master_ifindex(dst ? dst->dev : skb->dev);
|
||||
}
|
||||
|
||||
/*
|
||||
* Must not send error if the source does not uniquely
|
||||
|
@@ -99,7 +99,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
|
||||
segs = ops->callbacks.gso_segment(skb, features);
|
||||
}
|
||||
|
||||
if (IS_ERR(segs))
|
||||
if (IS_ERR_OR_NULL(segs))
|
||||
goto out;
|
||||
|
||||
gso_partial = !!(skb_shinfo(segs)->gso_type & SKB_GSO_PARTIAL);
|
||||
|
@@ -1181,7 +1181,6 @@ route_lookup:
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
skb->protocol = htons(ETH_P_IPV6);
|
||||
skb_push(skb, sizeof(struct ipv6hdr));
|
||||
skb_reset_network_header(skb);
|
||||
ipv6h = ipv6_hdr(skb);
|
||||
|
@@ -1122,6 +1122,33 @@ static struct xfrm6_protocol vti_ipcomp6_protocol __read_mostly = {
|
||||
.priority = 100,
|
||||
};
|
||||
|
||||
static bool is_vti6_tunnel(const struct net_device *dev)
|
||||
{
|
||||
return dev->netdev_ops == &vti6_netdev_ops;
|
||||
}
|
||||
|
||||
static int vti6_device_event(struct notifier_block *unused,
|
||||
unsigned long event, void *ptr)
|
||||
{
|
||||
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
|
||||
struct ip6_tnl *t = netdev_priv(dev);
|
||||
|
||||
if (!is_vti6_tunnel(dev))
|
||||
return NOTIFY_DONE;
|
||||
|
||||
switch (event) {
|
||||
case NETDEV_DOWN:
|
||||
if (!net_eq(t->net, dev_net(dev)))
|
||||
xfrm_garbage_collect(t->net);
|
||||
break;
|
||||
}
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static struct notifier_block vti6_notifier_block __read_mostly = {
|
||||
.notifier_call = vti6_device_event,
|
||||
};
|
||||
|
||||
/**
|
||||
* vti6_tunnel_init - register protocol and reserve needed resources
|
||||
*
|
||||
@@ -1132,6 +1159,8 @@ static int __init vti6_tunnel_init(void)
|
||||
const char *msg;
|
||||
int err;
|
||||
|
||||
register_netdevice_notifier(&vti6_notifier_block);
|
||||
|
||||
msg = "tunnel device";
|
||||
err = register_pernet_device(&vti6_net_ops);
|
||||
if (err < 0)
|
||||
@@ -1164,6 +1193,7 @@ xfrm_proto_ah_failed:
|
||||
xfrm_proto_esp_failed:
|
||||
unregister_pernet_device(&vti6_net_ops);
|
||||
pernet_dev_failed:
|
||||
unregister_netdevice_notifier(&vti6_notifier_block);
|
||||
pr_err("vti6 init: failed to register %s\n", msg);
|
||||
return err;
|
||||
}
|
||||
@@ -1178,6 +1208,7 @@ static void __exit vti6_tunnel_cleanup(void)
|
||||
xfrm6_protocol_deregister(&vti_ah6_protocol, IPPROTO_AH);
|
||||
xfrm6_protocol_deregister(&vti_esp6_protocol, IPPROTO_ESP);
|
||||
unregister_pernet_device(&vti6_net_ops);
|
||||
unregister_netdevice_notifier(&vti6_notifier_block);
|
||||
}
|
||||
|
||||
module_init(vti6_tunnel_init);
|
||||
|
@@ -576,11 +576,11 @@ int nf_ct_frag6_gather(struct net *net, struct sk_buff *skb, u32 user)
|
||||
/* Jumbo payload inhibits frag. header */
|
||||
if (ipv6_hdr(skb)->payload_len == 0) {
|
||||
pr_debug("payload len = 0\n");
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (find_prev_fhdr(skb, &prevhdr, &nhoff, &fhoff) < 0)
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
|
||||
if (!pskb_may_pull(skb, fhoff + sizeof(*fhdr)))
|
||||
return -ENOMEM;
|
||||
|
@@ -69,7 +69,7 @@ static unsigned int ipv6_defrag(void *priv,
|
||||
if (err == -EINPROGRESS)
|
||||
return NF_STOLEN;
|
||||
|
||||
return NF_ACCEPT;
|
||||
return err == 0 ? NF_ACCEPT : NF_DROP;
|
||||
}
|
||||
|
||||
static struct nf_hook_ops ipv6_defrag_ops[] = {
|
||||
|
@@ -156,6 +156,7 @@ void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook)
|
||||
fl6.daddr = oip6h->saddr;
|
||||
fl6.fl6_sport = otcph->dest;
|
||||
fl6.fl6_dport = otcph->source;
|
||||
fl6.flowi6_oif = l3mdev_master_ifindex(skb_dst(oldskb)->dev);
|
||||
security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6));
|
||||
dst = ip6_route_output(net, NULL, &fl6);
|
||||
if (dst->error) {
|
||||
|
@@ -155,6 +155,8 @@ int __ip6_local_out(struct net *net, struct sock *sk, struct sk_buff *skb)
|
||||
if (unlikely(!skb))
|
||||
return 0;
|
||||
|
||||
skb->protocol = htons(ETH_P_IPV6);
|
||||
|
||||
return nf_hook(NFPROTO_IPV6, NF_INET_LOCAL_OUT,
|
||||
net, sk, skb, NULL, skb_dst(skb)->dev,
|
||||
dst_output);
|
||||
|
Reference in New Issue
Block a user