[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22797 - gnunet/src/testing
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22797 - gnunet/src/testing |
Date: |
Fri, 20 Jul 2012 16:48:47 +0200 |
Author: harsha
Date: 2012-07-20 16:48:47 +0200 (Fri, 20 Jul 2012)
New Revision: 22797
Modified:
gnunet/src/testing/testing.c
Log:
decide btw ipv4 or ipv6
Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c 2012-07-20 14:33:53 UTC (rev 22796)
+++ gnunet/src/testing/testing.c 2012-07-20 14:48:47 UTC (rev 22797)
@@ -605,7 +605,8 @@
/**
- * Section iterator to set ACCEPT_FROM in all sections
+ * Section iterator to set ACCEPT_FROM/ACCEPT_FROM6 depending on the ip of the
+ * controller in all sections
*
* @param cls the UpdateContext
* @param section name of the section
@@ -620,6 +621,7 @@
char *ptr;
char *orig_allowed_hosts;
char *allowed_hosts;
+ char *ACCEPT_FROM_key;
uint16_t ikeys_cnt;
uint16_t key;
@@ -681,8 +683,12 @@
GNUNET_free (ikeys);
}
GNUNET_free_non_null (val);
+ ACCEPT_FROM_key = "ACCEPT_FROM";
+ if ((NULL != uc->system->controller) &&
+ (NULL != strstr (uc->system->controller, ":"))) /* IPv6 in use */
+ ACCEPT_FROM_key = "ACCEPT_FROM6";
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (uc->cfg, section, "ACCEPT_FROM",
+ GNUNET_CONFIGURATION_get_value_string (uc->cfg, section, ACCEPT_FROM_key,
&orig_allowed_hosts))
{
orig_allowed_hosts = GNUNET_strdup ("127.0.0.1;");
@@ -693,7 +699,7 @@
GNUNET_asprintf (&allowed_hosts, "%s%s;", orig_allowed_hosts,
uc->system->controller);
GNUNET_free (orig_allowed_hosts);
- GNUNET_CONFIGURATION_set_value_string (uc->cfg, section, "ACCEPT_FROM",
+ GNUNET_CONFIGURATION_set_value_string (uc->cfg, section, ACCEPT_FROM_key,
allowed_hosts);
GNUNET_free (allowed_hosts);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22797 - gnunet/src/testing,
gnunet <=