Commit 98a39431 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 3b89d486 158cb909
......@@ -324,8 +324,9 @@ destroy_conntrack(struct nf_conntrack *nfct)
ip_conntrack_destroyed(ct);
WRITE_LOCK(&ip_conntrack_lock);
/* Delete us from our own list to prevent corruption later */
list_del(&ct->sibling_list);
/* Make sure don't leave any orphaned expectations lying around */
if (ct->expecting)
remove_expectations(ct, 1);
/* Delete our master expectation */
if (ct->master) {
......@@ -1127,10 +1128,8 @@ int ip_conntrack_alter_reply(struct ip_conntrack *conntrack,
DUMP_TUPLE(newreply);
conntrack->tuplehash[IP_CT_DIR_REPLY].tuple = *newreply;
if (!conntrack->master)
conntrack->helper = LIST_FIND(&helpers, helper_cmp,
struct ip_conntrack_helper *,
newreply);
if (!conntrack->master && list_empty(&conntrack->sibling_list))
conntrack->helper = ip_ct_find_helper(newreply);
WRITE_UNLOCK(&ip_conntrack_lock);
return 1;
......
......@@ -177,6 +177,8 @@ static int tcp_packet(struct ip_conntrack *conntrack,
if (skb_copy_bits(skb, skb->nh.iph->ihl * 4, &tcph, sizeof(tcph)) != 0)
return -1;
if (skb->len < skb->nh.iph->ihl * 4 + tcph.doff * 4)
return -1;
/* If only reply is a RST, we can consider ourselves not to
have an established connection: this is a fairly common
......
......@@ -572,34 +572,26 @@ static void udpv6_mcast_deliver(struct udphdr *uh,
struct sk_buff *skb)
{
struct sock *sk, *sk2;
struct sk_buff *buff;
int dif;
read_lock(&udp_hash_lock);
sk = sk_head(&udp_hash[ntohs(uh->dest) & (UDP_HTABLE_SIZE - 1)]);
dif = skb->dev->ifindex;
sk = udp_v6_mcast_next(sk, uh->dest, daddr, uh->source, saddr, dif);
if (!sk)
goto free_skb;
if (!sk) {
kfree_skb(skb);
goto out;
}
buff = NULL;
sk2 = sk;
while ((sk2 = udp_v6_mcast_next(sk_next(sk2), uh->dest, daddr,
uh->source, saddr, dif))) {
if (!buff) {
buff = skb_clone(skb, GFP_ATOMIC);
if (!buff)
continue;
}
if (udpv6_queue_rcv_skb(sk2, buff) >= 0)
buff = NULL;
}
struct sk_buff *buff = skb_clone(skb, GFP_ATOMIC);
if (buff)
kfree_skb(buff);
if (udpv6_queue_rcv_skb(sk, skb) < 0) {
free_skb:
kfree_skb(skb);
udpv6_queue_rcv_skb(sk2, buff);
}
udpv6_queue_rcv_skb(sk, skb);
out:
read_unlock(&udp_hash_lock);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment