aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/main.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-05-31 17:07:11 (GMT)
committerJouni Malinen <j@w1.fi>2011-05-31 17:07:11 (GMT)
commit38e24575c18b02a2f8bf7ea38b937ad010682872 (patch)
tree46df39222d7603aa5d9c14fea6fe05d8a9c6487a /wpa_supplicant/main.c
parentceb34f250af7a7082f18c1e0451dc7fbc0f000f3 (diff)
downloadhostap-38e24575c18b02a2f8bf7ea38b937ad010682872.zip
hostap-38e24575c18b02a2f8bf7ea38b937ad010682872.tar.gz
hostap-38e24575c18b02a2f8bf7ea38b937ad010682872.tar.bz2
random: Add support for maintaining internal entropy store over restarts
This can be used to avoid rejection of first two 4-way handshakes every time hostapd (or wpa_supplicant in AP/IBSS mode) is restarted. A new command line parameter, -e, can now be used to specify an entropy file that will be used to maintain the needed state.
Diffstat (limited to 'wpa_supplicant/main.c')
-rw-r--r--wpa_supplicant/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/wpa_supplicant/main.c b/wpa_supplicant/main.c
index c0aa59c..e196f3c 100644
--- a/wpa_supplicant/main.c
+++ b/wpa_supplicant/main.c
@@ -33,7 +33,8 @@ static void usage(void)
"[-g<global ctrl>] \\\n"
" -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] "
"[-p<driver_param>] \\\n"
- " [-b<br_ifname>] [-f<debug file>] \\\n"
+ " [-b<br_ifname>] [-f<debug file>] [-e<entropy file>] "
+ "\\\n"
" [-o<override driver>] [-O<override ctrl>] \\\n"
" [-N -i<ifname> -c<conf> [-C<ctrl>] "
"[-D<driver>] \\\n"
@@ -56,7 +57,8 @@ static void usage(void)
" -C = ctrl_interface parameter (only used if -c is not)\n"
" -i = interface name\n"
" -d = increase debugging verbosity (-dd even more)\n"
- " -D = driver name (can be multiple drivers: nl80211,wext)\n");
+ " -D = driver name (can be multiple drivers: nl80211,wext)\n"
+ " -e = entropy file\n");
#ifdef CONFIG_DEBUG_FILE
printf(" -f = log output to debug file instead of stdout\n");
#endif /* CONFIG_DEBUG_FILE */
@@ -143,7 +145,7 @@ int main(int argc, char *argv[])
wpa_supplicant_fd_workaround();
for (;;) {
- c = getopt(argc, argv, "b:Bc:C:D:df:g:hi:KLNo:O:p:P:qstuvW");
+ c = getopt(argc, argv, "b:Bc:C:D:de:f:g:hi:KLNo:O:p:P:qstuvW");
if (c < 0)
break;
switch (c) {
@@ -172,6 +174,9 @@ int main(int argc, char *argv[])
params.wpa_debug_level--;
break;
#endif /* CONFIG_NO_STDOUT_DEBUG */
+ case 'e':
+ params.entropy_file = optarg;
+ break;
#ifdef CONFIG_DEBUG_FILE
case 'f':
params.wpa_debug_file_path = optarg;