aboutsummaryrefslogtreecommitdiff
path: root/src/nat
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2011-09-15 12:30:50 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2011-09-15 12:30:50 +0000
commita112d57e78f1fe6640c54ddf818d84f5a9c74142 (patch)
treee2c36c856ac3247492656a134b9141fbb1addf75 /src/nat
parent009c796b005ae0b20c370b9836f112baccdee421 (diff)
actually use external resolution code; fix SUID check
git-svn-id: https://gnunet.org/svn/gnunet@16861 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/nat')
-rw-r--r--src/nat/nat.c12
-rw-r--r--src/nat/test_nat_test.c10
2 files changed, 7 insertions, 15 deletions
diff --git a/src/nat/nat.c b/src/nat/nat.c
index 9258384964..0eadf5337f 100644
--- a/src/nat/nat.c
+++ b/src/nat/nat.c
@@ -293,7 +293,8 @@ struct GNUNET_NAT_Handle
unsigned int num_local_addrs;
/**
- * The our external address (according to config, UPnP may disagree...)
+ * Our external address (according to config, UPnP may disagree...),
+ * in dotted decimal notation, IPv4-only. Or NULL if not known.
*/
char *external_address;
@@ -1106,15 +1107,6 @@ GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp,
"EXTERNAL_ADDRESS",
&h->external_address);
}
- if ((h->external_address != NULL) &&
- (inet_pton (AF_INET, h->external_address, &in_addr) != 1))
- {
- GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "nat",
- _("Malformed %s `%s' given in configuration!\n"),
- "EXTERNAL_ADDRESS", h->external_address);
- GNUNET_free (h->external_address);
- h->external_address = NULL;
- }
h->behind_nat =
GNUNET_CONFIGURATION_get_value_yesno (cfg, "nat", "BEHIND_NAT");
h->nat_punched =
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c
index 1b4d1bc1d2..e960bc3fdb 100644
--- a/src/nat/test_nat_test.c
+++ b/src/nat/test_nat_test.c
@@ -108,23 +108,23 @@ main (int argc, char *const argv[])
#endif
NULL);
- nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
+ nat_res = GNUNET_OS_check_helper_binary ("gnunet-helper-nat-server");
if (GNUNET_NO == nat_res)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "SUID not set");
+ "gnunet-helper-nat-server", "SUID not set");
return 0;
}
if (GNUNET_SYSERR == nat_res)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "file not found");
+ "gnunet-helper-nat-server", "file not found");
return 0;
}
gns =
- GNUNET_OS_start_process (NULL, NULL, "gnunet-nat-server",
- "gnunet-nat-server",
+ GNUNET_OS_start_process (NULL, NULL, "gnunet-helper-nat-server",
+ "gnunet-helper-nat-server",
#if VERBOSE
"-L", "DEBUG",
#endif