mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
[TCP]: Restore SKB socket owner setting in tcp_transmit_skb().
Revert 931731123a
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>
This commit is contained in:
parent
d5e76b0a28
commit
e89862f4c5
8 changed files with 12 additions and 10 deletions
|
@ -467,6 +467,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
|
|||
|
||||
th = (struct tcphdr *) skb_push(skb, tcp_header_size);
|
||||
skb->h.th = th;
|
||||
skb_set_owner_w(skb, sk);
|
||||
|
||||
/* Build TCP header and checksum it. */
|
||||
th->source = inet->sport;
|
||||
|
@ -540,7 +541,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
|
|||
if (after(tcb->end_seq, tp->snd_nxt) || tcb->seq == tcb->end_seq)
|
||||
TCP_INC_STATS(TCP_MIB_OUTSEGS);
|
||||
|
||||
err = icsk->icsk_af_ops->queue_xmit(skb, sk, 0);
|
||||
err = icsk->icsk_af_ops->queue_xmit(skb, 0);
|
||||
if (likely(err <= 0))
|
||||
return err;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue