From 1bbef32baabfa9da3bb55754da06c0b05550aa46 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 22 Apr 2012 13:54:36 +0200 Subject: Add --show-key and --machine-readable options --- src/fastd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/fastd.c') 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); -- cgit v1.2.3