diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-22 13:54:36 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-22 13:54:36 +0200 |
commit | 1bbef32baabfa9da3bb55754da06c0b05550aa46 (patch) | |
tree | 43f06a3c17e12a09e6dbdc60095470586a27b43d /src/fastd.c | |
parent | f21a6e3cec1fcc9930f06d3d0b8714cd34718815 (diff) | |
download | fastd-1bbef32baabfa9da3bb55754da06c0b05550aa46.tar fastd-1bbef32baabfa9da3bb55754da06c0b05550aa46.zip |
Add --show-key and --machine-readable options
Diffstat (limited to 'src/fastd.c')
-rw-r--r-- | src/fastd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fastd.c b/src/fastd.c index 0c7e6f5..b35f70e 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -625,8 +625,18 @@ int main(int argc, char *argv[]) { fastd_configure(&ctx, &conf, argc, argv); ctx.conf = &conf; + if (conf.generate_key) { + conf.protocol->generate_key(&ctx); + exit(0); + } + conf.protocol_config = conf.protocol->init(&ctx); + if (conf.show_key) { + conf.protocol->show_key(&ctx); + exit(0); + } + update_time(&ctx); init_tuntap(&ctx); |