diff options
-rw-r--r-- | src/nat/nat.c | 12 | ||||
-rw-r--r-- | src/nat/test_nat_test.c | 10 |
2 files changed, 7 insertions, 15 deletions
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 | |||
293 | unsigned int num_local_addrs; | 293 | unsigned int num_local_addrs; |
294 | 294 | ||
295 | /** | 295 | /** |
296 | * The our external address (according to config, UPnP may disagree...) | 296 | * Our external address (according to config, UPnP may disagree...), |
297 | * in dotted decimal notation, IPv4-only. Or NULL if not known. | ||
297 | */ | 298 | */ |
298 | char *external_address; | 299 | char *external_address; |
299 | 300 | ||
@@ -1106,15 +1107,6 @@ GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp, | |||
1106 | "EXTERNAL_ADDRESS", | 1107 | "EXTERNAL_ADDRESS", |
1107 | &h->external_address); | 1108 | &h->external_address); |
1108 | } | 1109 | } |
1109 | if ((h->external_address != NULL) && | ||
1110 | (inet_pton (AF_INET, h->external_address, &in_addr) != 1)) | ||
1111 | { | ||
1112 | GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "nat", | ||
1113 | _("Malformed %s `%s' given in configuration!\n"), | ||
1114 | "EXTERNAL_ADDRESS", h->external_address); | ||
1115 | GNUNET_free (h->external_address); | ||
1116 | h->external_address = NULL; | ||
1117 | } | ||
1118 | h->behind_nat = | 1110 | h->behind_nat = |
1119 | GNUNET_CONFIGURATION_get_value_yesno (cfg, "nat", "BEHIND_NAT"); | 1111 | GNUNET_CONFIGURATION_get_value_yesno (cfg, "nat", "BEHIND_NAT"); |
1120 | h->nat_punched = | 1112 | 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[]) | |||
108 | #endif | 108 | #endif |
109 | NULL); | 109 | NULL); |
110 | 110 | ||
111 | nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server"); | 111 | nat_res = GNUNET_OS_check_helper_binary ("gnunet-helper-nat-server"); |
112 | if (GNUNET_NO == nat_res) | 112 | if (GNUNET_NO == nat_res) |
113 | { | 113 | { |
114 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n", | 114 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n", |
115 | "gnunet-nat-server", "SUID not set"); | 115 | "gnunet-helper-nat-server", "SUID not set"); |
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | if (GNUNET_SYSERR == nat_res) | 118 | if (GNUNET_SYSERR == nat_res) |
119 | { | 119 | { |
120 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n", | 120 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n", |
121 | "gnunet-nat-server", "file not found"); | 121 | "gnunet-helper-nat-server", "file not found"); |
122 | return 0; | 122 | return 0; |
123 | } | 123 | } |
124 | 124 | ||
125 | gns = | 125 | gns = |
126 | GNUNET_OS_start_process (NULL, NULL, "gnunet-nat-server", | 126 | GNUNET_OS_start_process (NULL, NULL, "gnunet-helper-nat-server", |
127 | "gnunet-nat-server", | 127 | "gnunet-helper-nat-server", |
128 | #if VERBOSE | 128 | #if VERBOSE |
129 | "-L", "DEBUG", | 129 | "-L", "DEBUG", |
130 | #endif | 130 | #endif |