From: Nathan S. Evans Date: Wed, 23 Jun 2010 08:34:49 +0000 (+0000) Subject: define nat port X-Git-Tag: initial-import-from-subversion-38251~21272 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=234982d6cfba1ad268492f4955a905992d997f1d;p=oweals%2Fgnunet.git define nat port --- diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 434fd9ba1..71f1dd190 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -61,6 +61,8 @@ */ #define UDP_DIRECT_DISTANCE 1 +#define DEFAULT_NAT_PORT 0 + /** * How long until we give up on transmitting the welcome message? */ @@ -751,7 +753,7 @@ process_interfaces (void *cls, v4 = (struct sockaddr_in *) addr; if ((plugin->behind_nat == GNUNET_YES) && (plugin->only_nat_addresses == GNUNET_YES)) { - v4->sin_port = htons (0); /* Indicates to receiver we are behind NAT */ + v4->sin_port = htons (DEFAULT_NAT_PORT); /* Indicates to receiver we are behind NAT */ } else if (plugin->behind_nat == GNUNET_YES) /* We are behind NAT, but will advertise NAT and normal addresses */ {