diff options
author | David S. Miller <davem@nuts.davemloft.net> | 2004-07-08 02:34:29 -0700 |
---|---|---|
committer | David S. Miller <davem@nuts.davemloft.net> | 2004-07-08 02:34:29 -0700 |
commit | 5d42dde43391899eba74d03f4f8f20901855fef8 (patch) | |
tree | 740f224dfa699efdf944615d0d49320359a39a14 /net | |
parent | 5e6ae6a49621072af626fad4c5d87b5946dc318f (diff) | |
download | history-5d42dde43391899eba74d03f4f8f20901855fef8.tar.gz |
[IPV4]: Fix multicast socket hangs.
If a multicast packet gets looped back, the sending
socket can hang if a local read just sits and does
not empty its receive queue.
The problem is that when an SKB clone is freed up,
the destructor is only invoked for the head SKB when
there is a fraglist (which is created for fragmentation).
The solution is to account the fragment list SKB lengths
in the top-level head SKB, then it all works out.
Signed-off-by: David S. Miller <davem@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ip_output.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 51b3b465a006df..770eeeece875ae 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -498,10 +498,6 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)) skb_headroom(frag) < hlen) goto slow_path; - /* Correct socket ownership. */ - if (frag->sk == NULL && skb->sk) - goto slow_path; - /* Partially cloned skb? */ if (skb_shared(frag)) goto slow_path; @@ -1113,12 +1109,10 @@ int ip_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 } /* Unless user demanded real pmtu discovery (IP_PMTUDISC_DO), we allow |