mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 20:06:35 +00:00
ipv6: tcp: give socket pointer to control skbs
tcp_v6_send_response() send orphaned 'control packets'. These are RST packets and also ACK packets sent from TIME_WAIT. Some eBPF programs would prefer to have a meaningful skb->sk pointer as much as possible. This means that TCP can now attach TIME_WAIT sockets to outgoing skbs. Signed-off-by: Eric Dumazet <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Reviewed-by: Brian Vazquez <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
committed by
Jakub Kicinski
parent
5ced52fa8f
commit
507a96737d
@@ -967,6 +967,9 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
|
||||
}
|
||||
|
||||
if (sk) {
|
||||
/* unconstify the socket only to attach it to buff with care. */
|
||||
skb_set_owner_edemux(buff, (struct sock *)sk);
|
||||
|
||||
if (sk->sk_state == TCP_TIME_WAIT)
|
||||
mark = inet_twsk(sk)->tw_mark;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user