Skip to content

Commit 004a5d0

Browse files
Eric Dumazetdavem330
authored andcommitted
net: use sk_fullsock() in __netdev_pick_tx()
SYN_RECV & TIMEWAIT sockets are not full blown, they do not have a sk_dst_cache pointer. Fixes: ca6fb06 ("tcp: attach SYNACK messages to request sockets instead of listener") Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e7eadb4 commit 004a5d0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

include/net/request_sock.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ reqsk_alloc(const struct request_sock_ops *ops, struct sock *sk_listener)
9292
req->rsk_listener = sk_listener;
9393
req_to_sk(req)->sk_prot = sk_listener->sk_prot;
9494
sk_node_init(&req_to_sk(req)->sk_node);
95+
sk_tx_queue_clear(req_to_sk(req));
9596
req->saved_syn = NULL;
9697
/* Following is temporary. It is coupled with debugging
9798
* helpers in reqsk_put() & reqsk_free()

net/core/dev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2974,6 +2974,7 @@ static u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb)
29742974
new_index = skb_tx_hash(dev, skb);
29752975

29762976
if (queue_index != new_index && sk &&
2977+
sk_fullsock(sk) &&
29772978
rcu_access_pointer(sk->sk_dst_cache))
29782979
sk_tx_queue_set(sk, new_index);
29792980

0 commit comments

Comments
 (0)