summaryrefslogtreecommitdiffstats
path: root/src/config.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-04-02 21:52:21 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-04-02 21:52:21 +0200
commit6c401d89e229fe24cb35b4758f1abb3cfb1cc966 (patch)
tree35ffc937a8684de1b1634d0f41cde7824abc9a26 /src/config.c
parent77520caad8302266537e87104f6496040fc98bb4 (diff)
downloadfastd-6c401d89e229fe24cb35b4758f1abb3cfb1cc966.tar
fastd-6c401d89e229fe24cb35b4758f1abb3cfb1cc966.zip
Allow peer-to-peer forwarding
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 1842891..964c2d6 100644
--- a/src/config.c
+++ b/src/config.c
@@ -64,6 +64,8 @@ static void default_config(fastd_config *conf) {
conf->mtu = 1500;
conf->mode = MODE_TAP;
+ conf->peer_to_peer = false;
+
conf->protocol = &fastd_protocol_null;
conf->secret = NULL;
conf->key_valid = 3600; /* 60 minutes */
@@ -394,6 +396,11 @@ void fastd_configure(fastd_context *ctx, fastd_config *conf, int argc, char *con
continue;
}
+ IF_OPTION("--peer-to-peer") {
+ conf->peer_to_peer = true;
+ continue;
+ }
+
IF_OPTION_ARG("--on-up") {
free(conf->on_up);
free(conf->on_up_dir);