diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2005-05-21 22:00:02 +0100 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2005-05-21 22:00:02 +0100 |
| commit | 67394f8f069c2fdf90f3b6d851824c07815442af (patch) | |
| tree | 0c33e62d34dbaecea434ae9ece3cc0c56db8b1f7 /net/ipv6/ip6_output.c | |
| parent | 450cbfbbbd88876e3ccec1d277f613221ca82bb7 (diff) | |
| parent | 9636273dae265b9354b861b373cd43cd76a6d0fe (diff) | |
Merge with /usr/src/ntfs-2.6.git
Diffstat (limited to 'net/ipv6/ip6_output.c')
| -rw-r--r-- | net/ipv6/ip6_output.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 0f0711417c9d..b78a53586804 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -552,13 +552,17 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) skb_headroom(frag) < hlen) goto slow_path; - /* Correct socket ownership. */ - if (frag->sk == NULL) - goto slow_path; - /* Partially cloned skb? */ if (skb_shared(frag)) goto slow_path; + + BUG_ON(frag->sk); + if (skb->sk) { + sock_hold(skb->sk); + frag->sk = skb->sk; + frag->destructor = sock_wfree; + skb->truesize -= frag->truesize; + } } err = 0; @@ -1116,12 +1120,10 @@ int ip6_push_pending_frames(struct sock *sk) tail_skb = &(tmp_skb->next); skb->len += tmp_skb->len; skb->data_len += tmp_skb->len; -#if 0 /* Logically correct, but useless work, ip_fragment() will have to undo */ skb->truesize += tmp_skb->truesize; __sock_put(tmp_skb->sk); tmp_skb->destructor = NULL; tmp_skb->sk = NULL; -#endif } ipv6_addr_copy(final_dst, &fl->fl6_dst); |
