summaryrefslogtreecommitdiff
path: root/src/vpn/gnunet-helper-vpn.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-30 21:21:49 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-30 21:21:49 +0000
commit77c03065a39f869a188b4e2e8cd6a88dc7a02fc8 (patch)
treecdce3e214df170eaa8106459a44fc2a82b70a629 /src/vpn/gnunet-helper-vpn.c
parent84dc557dc24e981d8c9a85b1bb087a4d803225a4 (diff)
-also run if system does not support IPv4 or IPv6 at all - #2123
Diffstat (limited to 'src/vpn/gnunet-helper-vpn.c')
-rw-r--r--src/vpn/gnunet-helper-vpn.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vpn/gnunet-helper-vpn.c b/src/vpn/gnunet-helper-vpn.c
index 5a1b708e2..5903255f8 100644
--- a/src/vpn/gnunet-helper-vpn.c
+++ b/src/vpn/gnunet-helper-vpn.c
@@ -530,10 +530,10 @@ PROCESS_BUFFER:
* @param argc must be 6
* @param argv 0: binary name (gnunet-helper-vpn)
* 1: tunnel interface name (gnunet-vpn)
- * 2: IPv6 address (::1)
- * 3: IPv6 netmask length in bits (64)
- * 4: IPv4 address (1.2.3.4)
- * 5: IPv4 netmask (255.255.0.0)
+ * 2: IPv6 address (::1), "-" to disable
+ * 3: IPv6 netmask length in bits (64), ignored if #2 is "-"
+ * 4: IPv4 address (1.2.3.4), "-" to disable
+ * 5: IPv4 netmask (255.255.0.0), ignored if #4 is "-"
*/
int
main (int argc, char **argv)
@@ -562,6 +562,7 @@ main (int argc, char **argv)
return 1;
}
+ if (0 != strcmp (argv[2], "-"))
{
const char *address = argv[2];
long prefix_len = atol (argv[3]);
@@ -575,6 +576,7 @@ main (int argc, char **argv)
set_address6 (dev, address, prefix_len);
}
+ if (0 != strcmp (argv[4], "-"))
{
const char *address = argv[4];
const char *mask = argv[5];