From: Pablo Neira Ayuso Date: Mon, 14 Dec 2015 19:29:00 +0000 (+0100) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a4ec80082c82f3fda775d13b2a72aac38248ced6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'master' of git://git./linux/kernel/git/davem/net-next Resolve conflict between commit 264640fc2c5f4f ("ipv6: distinguish frag queues by device for multicast and link-local packets") from the net tree and commit 029f7f3b8701c ("netfilter: ipv6: nf_defrag: avoid/free clone operations") from the nf-next tree. Signed-off-by: Pablo Neira Ayuso Conflicts: net/ipv6/netfilter/nf_conntrack_reasm.c --- a4ec80082c82f3fda775d13b2a72aac38248ced6 diff --cc net/ipv6/netfilter/nf_conntrack_reasm.c index 6e5f0e0d49e0,bab4441ed4e4..e4347aeb2e65 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c @@@ -579,19 -582,31 +580,21 @@@ int nf_ct_frag6_gather(struct net *net } if (find_prev_fhdr(skb, &prevhdr, &nhoff, &fhoff) < 0) - return skb; + return -EINVAL; - clone = skb_clone(skb, GFP_ATOMIC); - if (clone == NULL) { - pr_debug("Can't clone skb\n"); - return skb; - } + if (!pskb_may_pull(skb, fhoff + sizeof(*fhdr))) + return -ENOMEM; - NFCT_FRAG6_CB(clone)->orig = skb; - - if (!pskb_may_pull(clone, fhoff + sizeof(*fhdr))) { - pr_debug("message is too short.\n"); - goto ret_orig; - } - - skb_set_transport_header(clone, fhoff); - hdr = ipv6_hdr(clone); - fhdr = (struct frag_hdr *)skb_transport_header(clone); + skb_set_transport_header(skb, fhoff); + hdr = ipv6_hdr(skb); + fhdr = (struct frag_hdr *)skb_transport_header(skb); fq = fq_find(net, fhdr->identification, user, &hdr->saddr, &hdr->daddr, - ip6_frag_ecn(hdr)); - if (fq == NULL) + skb->dev ? skb->dev->ifindex : 0, ip6_frag_ecn(hdr)); + if (fq == NULL) { + pr_debug("Can't find and can't create new queue\n"); - goto ret_orig; + return -ENOMEM; + } spin_lock_bh(&fq->q.lock);