diff options
| author | imoseyon <imoseyon@gmail.com> | 2014-12-14 10:36:51 -0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-09-10 12:06:52 +0200 |
| commit | e9c9fff8d3d4e053157db364ae4840882ab30eac (patch) | |
| tree | 43be6a1fd3e2e87290c8820c896c468a4b09e7b2 /net | |
| parent | b245cbd5c6ae4cfa0fea4f61b84efc0d2397df78 (diff) | |
random: sprinkle e/f/prandom in places that deplete entropy often
Diffstat (limited to 'net')
| -rw-r--r-- | net/core/neighbour.c | 2 | ||||
| -rw-r--r-- | net/core/secure_seq.c | 2 | ||||
| -rw-r--r-- | net/ipv6/addrconf.c | 2 | ||||
| -rw-r--r-- | net/netlink/af_netlink.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index b49e8bafa..c0bdf4857 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -310,7 +310,7 @@ out_entries: static void neigh_get_hash_rnd(u32 *x) { - get_random_bytes(x, sizeof(*x)); + prandom_bytes(x, sizeof(*x)); *x |= 1; } diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c index d0afc322b..a5edfff83 100644 --- a/net/core/secure_seq.c +++ b/net/core/secure_seq.c @@ -25,7 +25,7 @@ static void net_secret_init(void) for (i = NET_SECRET_SIZE; i > 0;) { do { - get_random_bytes(&tmp, sizeof(tmp)); + prandom_bytes(&tmp, sizeof(tmp)); } while (!tmp); cmpxchg(&net_secret[--i], 0, tmp); } diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index ccddbe675..0be739664 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1925,7 +1925,7 @@ static int ipv6_inherit_eui64(u8 *eui, struct inet6_dev *idev) static void __ipv6_regen_rndid(struct inet6_dev *idev) { regen: - get_random_bytes(idev->rndid, sizeof(idev->rndid)); + prandom_bytes(idev->rndid, sizeof(idev->rndid)); idev->rndid[0] &= ~0x02; /* diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 9eba0240f..92998c696 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -913,7 +913,7 @@ static int nl_portid_hash_rehash(struct nl_portid_hash *hash, int grow) hash->table = table; hash->mask = mask; hash->shift = shift; - get_random_bytes(&hash->rnd, sizeof(hash->rnd)); + prandom_bytes(&hash->rnd, sizeof(hash->rnd)); for (i = 0; i <= omask; i++) { struct sock *sk; |
