diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-01-26 04:04:55 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-01-26 04:04:55 -0500 |
commit | e89862f4c5b3c4ac9afcd8cb1365d2f1e16ddc3b (patch) | |
tree | f402fe7326021a371e11c2c59b7aaf1b12d300d3 /net/ipv4/tcp_output.c | |
parent | d5e76b0a280f71b20bdd20d1c1b4d6812ceb8c3a (diff) |
[TCP]: Restore SKB socket owner setting in tcp_transmit_skb().
Revert 931731123a103cfb3f70ac4b7abfc71d94ba1f03
We can't elide the skb_set_owner_w() here because things like certain
netfilter targets (such as owner MATCH) need a socket to be set on the
SKB for correct operation.
Thanks to Jan Engelhardt and other netfilter list members for
pointing this out.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 23e32c806916..975f4472af29 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -467,6 +467,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, | |||
467 | 467 | ||
468 | th = (struct tcphdr *) skb_push(skb, tcp_header_size); | 468 | th = (struct tcphdr *) skb_push(skb, tcp_header_size); |
469 | skb->h.th = th; | 469 | skb->h.th = th; |
470 | skb_set_owner_w(skb, sk); | ||
470 | 471 | ||
471 | /* Build TCP header and checksum it. */ | 472 | /* Build TCP header and checksum it. */ |
472 | th->source = inet->sport; | 473 | th->source = inet->sport; |
@@ -540,7 +541,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, | |||
540 | if (after(tcb->end_seq, tp->snd_nxt) || tcb->seq == tcb->end_seq) | 541 | if (after(tcb->end_seq, tp->snd_nxt) || tcb->seq == tcb->end_seq) |
541 | TCP_INC_STATS(TCP_MIB_OUTSEGS); | 542 | TCP_INC_STATS(TCP_MIB_OUTSEGS); |
542 | 543 | ||
543 | err = icsk->icsk_af_ops->queue_xmit(skb, sk, 0); | 544 | err = icsk->icsk_af_ops->queue_xmit(skb, 0); |
544 | if (likely(err <= 0)) | 545 | if (likely(err <= 0)) |
545 | return err; | 546 | return err; |
546 | 547 | ||