diff options
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index bb814a996..58135803a 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -1731,7 +1731,7 @@ udp_transport_server_start (void *cls) | |||
1731 | } | 1731 | } |
1732 | 1732 | ||
1733 | if ( (GNUNET_YES != | 1733 | if ( (GNUNET_YES != |
1734 | GNUNET_CONFIGURATION_get_value_yesno (plugin->env->cfg, "transport-udp", | 1734 | GNUNET_CONFIGURATION_get_value_yesno (plugin->env->cfg, "nat", |
1735 | "DISABLEV6"))) | 1735 | "DISABLEV6"))) |
1736 | { | 1736 | { |
1737 | plugin->udp_sockv6.desc = GNUNET_NETWORK_socket_create (PF_INET6, SOCK_DGRAM, 0); | 1737 | plugin->udp_sockv6.desc = GNUNET_NETWORK_socket_create (PF_INET6, SOCK_DGRAM, 0); |
@@ -2221,8 +2221,8 @@ libgnunet_plugin_transport_udp_init (void *cls) | |||
2221 | struct IPv4UdpAddress v4_address; | 2221 | struct IPv4UdpAddress v4_address; |
2222 | 2222 | ||
2223 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (env->cfg, | 2223 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (env->cfg, |
2224 | "transport-udp", | 2224 | "nat", |
2225 | "BEHIND_NAT")) | 2225 | "BEHIND_NAT")) |
2226 | { | 2226 | { |
2227 | /* We are behind nat (according to the user) */ | 2227 | /* We are behind nat (according to the user) */ |
2228 | if (check_gnunet_nat_binary("gnunet-nat-server") == GNUNET_YES) | 2228 | if (check_gnunet_nat_binary("gnunet-nat-server") == GNUNET_YES) |
@@ -2237,8 +2237,8 @@ libgnunet_plugin_transport_udp_init (void *cls) | |||
2237 | behind_nat = GNUNET_NO; /* We are not behind nat! */ | 2237 | behind_nat = GNUNET_NO; /* We are not behind nat! */ |
2238 | 2238 | ||
2239 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (env->cfg, | 2239 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (env->cfg, |
2240 | "transport-udp", | 2240 | "nat", |
2241 | "ALLOW_NAT")) | 2241 | "ALLOW_NAT")) |
2242 | { | 2242 | { |
2243 | if (check_gnunet_nat_binary("gnunet-nat-client") == GNUNET_YES) | 2243 | if (check_gnunet_nat_binary("gnunet-nat-client") == GNUNET_YES) |
2244 | allow_nat = GNUNET_YES; /* We will try to connect to NAT'd peers */ | 2244 | allow_nat = GNUNET_YES; /* We will try to connect to NAT'd peers */ |
@@ -2253,8 +2253,8 @@ libgnunet_plugin_transport_udp_init (void *cls) | |||
2253 | allow_nat = GNUNET_NO; /* We don't want to try to help NAT'd peers */ | 2253 | allow_nat = GNUNET_NO; /* We don't want to try to help NAT'd peers */ |
2254 | 2254 | ||
2255 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (env->cfg, | 2255 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (env->cfg, |
2256 | "transport-udp", | 2256 | "nat", |
2257 | "ONLY_NAT_ADDRESSES")) | 2257 | "ONLY_NAT_ADDRESSES")) |
2258 | only_nat_addresses = GNUNET_YES; /* We will only report our addresses as NAT'd */ | 2258 | only_nat_addresses = GNUNET_YES; /* We will only report our addresses as NAT'd */ |
2259 | else | 2259 | else |
2260 | only_nat_addresses = GNUNET_NO; /* We will report our addresses as NAT'd and non-NAT'd */ | 2260 | only_nat_addresses = GNUNET_NO; /* We will report our addresses as NAT'd and non-NAT'd */ |
@@ -2262,7 +2262,7 @@ libgnunet_plugin_transport_udp_init (void *cls) | |||
2262 | external_address = NULL; | 2262 | external_address = NULL; |
2263 | if (((GNUNET_YES == behind_nat) || (GNUNET_YES == allow_nat)) && (GNUNET_OK != | 2263 | if (((GNUNET_YES == behind_nat) || (GNUNET_YES == allow_nat)) && (GNUNET_OK != |
2264 | GNUNET_CONFIGURATION_get_value_string (env->cfg, | 2264 | GNUNET_CONFIGURATION_get_value_string (env->cfg, |
2265 | "transport-udp", | 2265 | "nat", |
2266 | "EXTERNAL_ADDRESS", | 2266 | "EXTERNAL_ADDRESS", |
2267 | &external_address))) | 2267 | &external_address))) |
2268 | { | 2268 | { |
@@ -2280,13 +2280,13 @@ libgnunet_plugin_transport_udp_init (void *cls) | |||
2280 | internal_address = NULL; | 2280 | internal_address = NULL; |
2281 | if ((GNUNET_YES == behind_nat) && (GNUNET_OK != | 2281 | if ((GNUNET_YES == behind_nat) && (GNUNET_OK != |
2282 | GNUNET_CONFIGURATION_get_value_string (env->cfg, | 2282 | GNUNET_CONFIGURATION_get_value_string (env->cfg, |
2283 | "transport-udp", | 2283 | "nat", |
2284 | "INTERNAL_ADDRESS", | 2284 | "INTERNAL_ADDRESS", |
2285 | &internal_address))) | 2285 | &internal_address))) |
2286 | { | 2286 | { |
2287 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 2287 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
2288 | _("Require INTERNAL_ADDRESS for service `%s' in configuration!\n"), | 2288 | _("Require INTERNAL_ADDRESS for service `%s' in configuration!\n"), |
2289 | "transport-udp"); | 2289 | "transport-udp"); |
2290 | GNUNET_free_non_null(external_address); | 2290 | GNUNET_free_non_null(external_address); |
2291 | return NULL; | 2291 | return NULL; |
2292 | } | 2292 | } |
@@ -2325,8 +2325,8 @@ libgnunet_plugin_transport_udp_init (void *cls) | |||
2325 | "transport-udp", "USE_LOCALADDR")) | 2325 | "transport-udp", "USE_LOCALADDR")) |
2326 | { | 2326 | { |
2327 | use_localaddresses = GNUNET_CONFIGURATION_get_value_yesno (env->cfg, | 2327 | use_localaddresses = GNUNET_CONFIGURATION_get_value_yesno (env->cfg, |
2328 | "transport-udp", | 2328 | "transport-udp", |
2329 | "USE_LOCALADDR"); | 2329 | "USE_LOCALADDR"); |
2330 | } | 2330 | } |
2331 | 2331 | ||
2332 | plugin = GNUNET_malloc (sizeof (struct Plugin)); | 2332 | plugin = GNUNET_malloc (sizeof (struct Plugin)); |