aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/bsc_nat.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-07-01 08:34:16 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-07-01 08:34:16 +0200
commit9f95ae888589dfddfe1fd325d0fb2f8361f03fab (patch)
treee2e7e132ea1a0483c1b7bec4910aa4f99e1fd8e6 /openbsc/include/openbsc/bsc_nat.h
parent8ee53ed9ec5e5f045778ab8b30f10cb86ec55c4a (diff)
nat: Use RAND_bytes instead of /dev/urandom
We don't need to consume all the entropy of the kernel but can use libcrypto (OpenSSL) to generate random data. It is not clear if we need to call RAND_load_file but I think we can assume that our Unices have a /dev/urandom. This takes less CPU time, provides good enough entropy (in theory) and leaves some in the kernel entropy pool.
Diffstat (limited to 'openbsc/include/openbsc/bsc_nat.h')
-rw-r--r--openbsc/include/openbsc/bsc_nat.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index 72773a981..3090eb045 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -307,9 +307,6 @@ struct bsc_nat {
/* control interface */
struct ctrl_handle *ctrl;
-
- /* for random values */
- int random_fd;
};
struct bsc_nat_ussd_con {