resolv: make res_randomid use random_bits()

It is at least "more random" than 0xffff & __getpid ();

Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Cristian Rodríguez 2021-08-06 15:17:49 -04:00 committed by Adhemerval Zanella
parent b5c8a3aa82
commit fa80ce6023

View File

@ -84,9 +84,10 @@
#include <resolv.h>
#include <unistd.h>
#include <random-bits.h>
unsigned int
res_randomid (void) {
return 0xffff & __getpid ();
return 0xffff & random_bits ();
}
libc_hidden_def (__res_randomid)