Skip to content
Commit 12c2a310 authored by Michael Walle's avatar Michael Walle Committed by Joe Hershberger
Browse files

net: make net_random_ethaddr() more random



The net_random_ethaddr() tries to get some entropy from different
startup times of a board. The seed is initialized with get_timer() which
has only a granularity of milliseconds. We can do better if we use
get_ticks() which returns the raw timer ticks. Using this we have a
higher chance of getting different values at startup.

Signed-off-by: default avatarMichael Walle <michael@walle.cc>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
parent 5ccd657b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment