diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-06-11 11:42:58 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-06-11 11:42:58 +0000 |
commit | de24f62f6916dcc6fd3b5464dc9fb2a72ca80bae (patch) | |
tree | 9e0ce50319fa2b86d25b6bc982fdd9f9bde13538 /src/transport/plugin_transport_udp.c | |
parent | 8ab1946b4136cb0b20a47661bb54dbe0820ba04f (diff) | |
download | gnunet-de24f62f6916dcc6fd3b5464dc9fb2a72ca80bae.tar.gz gnunet-de24f62f6916dcc6fd3b5464dc9fb2a72ca80bae.zip |
always add user provided external addresses (duh)
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 8caabd0d5..82ccaa8cb 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -1830,6 +1830,14 @@ libgnunet_plugin_transport_udp_init (void *cls) | |||
1830 | "udp", | 1830 | "udp", |
1831 | &in_addr, sizeof(in_addr), GNUNET_TIME_UNIT_FOREVER_REL); | 1831 | &in_addr, sizeof(in_addr), GNUNET_TIME_UNIT_FOREVER_REL); |
1832 | } | 1832 | } |
1833 | else if ((plugin->external_address != NULL) && (inet_pton(AF_INET, plugin->external_address, &in_addr.sin_addr) == 1)) | ||
1834 | { | ||
1835 | in_addr.sin_port = htons(plugin->port); | ||
1836 | in_addr.sin_family = AF_INET; | ||
1837 | plugin->env->notify_address (plugin->env->cls, | ||
1838 | "udp", | ||
1839 | &in_addr, sizeof(in_addr), GNUNET_TIME_UNIT_FOREVER_REL); | ||
1840 | } | ||
1833 | 1841 | ||
1834 | sockets_created = udp_transport_server_start (plugin); | 1842 | sockets_created = udp_transport_server_start (plugin); |
1835 | 1843 | ||