diff options
Diffstat (limited to 'src/nat/gnunet-service-nat.c')
-rw-r--r-- | src/nat/gnunet-service-nat.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/nat/gnunet-service-nat.c b/src/nat/gnunet-service-nat.c index 694949dde..59a340324 100644 --- a/src/nat/gnunet-service-nat.c +++ b/src/nat/gnunet-service-nat.c | |||
@@ -335,6 +335,11 @@ static struct StunExternalIP *se_tail; | |||
335 | */ | 335 | */ |
336 | int enable_upnp; | 336 | int enable_upnp; |
337 | 337 | ||
338 | /** | ||
339 | * Is IP Scanning enabled? #GNUNET_YES if enabled, #GNUNET_NO if disabled, | ||
340 | * without, only explicitly specified IPs will be handled (HOLE_EXTERNAL) | ||
341 | */ | ||
342 | int enable_ipscan; | ||
338 | 343 | ||
339 | /** | 344 | /** |
340 | * Remove and free an entry from the #lal_head DLL. | 345 | * Remove and free an entry from the #lal_head DLL. |
@@ -1939,12 +1944,18 @@ run (void *cls, | |||
1939 | &dyndns_frequency)) | 1944 | &dyndns_frequency)) |
1940 | dyndns_frequency = DYNDNS_FREQUENCY; | 1945 | dyndns_frequency = DYNDNS_FREQUENCY; |
1941 | 1946 | ||
1947 | enable_ipscan | ||
1948 | = GNUNET_CONFIGURATION_get_value_yesno (cfg, | ||
1949 | "NAT", | ||
1950 | "ENABLE_IPSCAN"); | ||
1951 | |||
1942 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, | 1952 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, |
1943 | NULL); | 1953 | NULL); |
1944 | stats = GNUNET_STATISTICS_create ("nat", | 1954 | stats = GNUNET_STATISTICS_create ("nat", |
1945 | cfg); | 1955 | cfg); |
1946 | scan_task = GNUNET_SCHEDULER_add_now (&run_scan, | 1956 | if (GNUNET_YES == enable_ipscan) |
1947 | NULL); | 1957 | scan_task = GNUNET_SCHEDULER_add_now (&run_scan, |
1958 | NULL); | ||
1948 | } | 1959 | } |
1949 | 1960 | ||
1950 | 1961 | ||