net: Set sk_txhash from a random number
This patch creates sk_set_txhash and eliminates protocol specific inet_set_txhash and ip6_set_txhash. sk_set_txhash simply sets a random number instead of performing flow dissection. sk_set_txash is also allowed to be called multiple times for the same socket, we'll need this when redoing the hash for negative routing advice. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7a86d96e4a
commit
877d1f6291
@@ -276,7 +276,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
|
||||
if (err)
|
||||
goto late_failure;
|
||||
|
||||
ip6_set_txhash(sk);
|
||||
sk_set_txhash(sk);
|
||||
|
||||
if (!tp->write_seq && likely(!tp->repair))
|
||||
tp->write_seq = secure_tcpv6_sequence_number(np->saddr.s6_addr32,
|
||||
@@ -1090,7 +1090,7 @@ static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
|
||||
newsk->sk_v6_rcv_saddr = ireq->ir_v6_loc_addr;
|
||||
newsk->sk_bound_dev_if = ireq->ir_iif;
|
||||
|
||||
ip6_set_txhash(newsk);
|
||||
sk_set_txhash(newsk);
|
||||
|
||||
/* Now IPv6 options...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user