Initial import of STUN support
[oweals/gnunet.git] / src / nat / nat.c
index 79088a182fcaa3352c874a49c1bceb16856337d3..907728fb4dd4ea452e83b2742de2457f8a8d4b71 100644 (file)
@@ -69,6 +69,11 @@ enum LocalAddressSource
    * given in the configuration (i.e. hole-punched DynDNS setup).
    */
   LAL_EXTERNAL_IP,
+  
+   /**
+   * Address was obtained by an external STUN server
+   */
+  LAL_EXTERNAL_STUN_IP,
 
   /**
    * Address was obtained by DNS resolution of the external hostname
@@ -1337,8 +1342,8 @@ GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg,
 
   if (NULL != h->address_callback)
   {
-    list_interfaces (h,
-                     NULL);
+    h->ifc_task = GNUNET_SCHEDULER_add_now (&list_interfaces,
+                                            h);
     if (GNUNET_YES == h->use_hostname)
       h->hostname_task = GNUNET_SCHEDULER_add_now (&resolve_hostname,
                                                    h);