From: Christian Grothoff Date: Thu, 15 Sep 2011 12:30:50 +0000 (+0000) Subject: actually use external resolution code; fix SUID check X-Git-Tag: initial-import-from-subversion-38251~17096 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=12c5d5b026fae9066ad279298197fd5ca407479d;p=oweals%2Fgnunet.git actually use external resolution code; fix SUID check --- diff --git a/src/nat/nat.c b/src/nat/nat.c index 925838496..0eadf5337 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 1b4d1bc1d..e960bc3fd 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