aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/datagram.c
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2015-07-28 16:02:05 -0700
committerDavid S. Miller <davem@davemloft.net>2015-07-29 22:44:04 -0700
commit877d1f6291f8e391237e324be58479a3e3a7407c (patch)
tree7fef04aed6fab396e8e1205a37fff6ad3a2450ed /net/ipv4/datagram.c
parentMerge branch 'thunderx_octeon_mdio' (diff)
downloadlinux-dev-877d1f6291f8e391237e324be58479a3e3a7407c.tar.xz
linux-dev-877d1f6291f8e391237e324be58479a3e3a7407c.zip
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>
Diffstat (limited to 'net/ipv4/datagram.c')
-rw-r--r--net/ipv4/datagram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/datagram.c b/net/ipv4/datagram.c
index 574fad9cca05..f915abff1350 100644
--- a/net/ipv4/datagram.c
+++ b/net/ipv4/datagram.c
@@ -74,7 +74,7 @@ int __ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len
inet->inet_daddr = fl4->daddr;
inet->inet_dport = usin->sin_port;
sk->sk_state = TCP_ESTABLISHED;
- inet_set_txhash(sk);
+ sk_set_txhash(sk);
inet->inet_id = jiffies;
sk_dst_set(sk, &rt->dst);