diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-06-23 08:34:49 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-06-23 08:34:49 +0000 |
commit | 234982d6cfba1ad268492f4955a905992d997f1d (patch) | |
tree | 575e9d5c7dcdfcc6152f5787abdbf19eec087a1c /src/transport/plugin_transport_udp.c | |
parent | a12a7f3988674adf7c2704eef43ba7324886d6d0 (diff) | |
download | gnunet-234982d6cfba1ad268492f4955a905992d997f1d.tar.gz gnunet-234982d6cfba1ad268492f4955a905992d997f1d.zip |
define nat port
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ | |||
61 | */ | 61 | */ |
62 | #define UDP_DIRECT_DISTANCE 1 | 62 | #define UDP_DIRECT_DISTANCE 1 |
63 | 63 | ||
64 | #define DEFAULT_NAT_PORT 0 | ||
65 | |||
64 | /** | 66 | /** |
65 | * How long until we give up on transmitting the welcome message? | 67 | * How long until we give up on transmitting the welcome message? |
66 | */ | 68 | */ |
@@ -751,7 +753,7 @@ process_interfaces (void *cls, | |||
751 | v4 = (struct sockaddr_in *) addr; | 753 | v4 = (struct sockaddr_in *) addr; |
752 | if ((plugin->behind_nat == GNUNET_YES) && (plugin->only_nat_addresses == GNUNET_YES)) | 754 | if ((plugin->behind_nat == GNUNET_YES) && (plugin->only_nat_addresses == GNUNET_YES)) |
753 | { | 755 | { |
754 | v4->sin_port = htons (0); /* Indicates to receiver we are behind NAT */ | 756 | v4->sin_port = htons (DEFAULT_NAT_PORT); /* Indicates to receiver we are behind NAT */ |
755 | } | 757 | } |
756 | else if (plugin->behind_nat == GNUNET_YES) /* We are behind NAT, but will advertise NAT and normal addresses */ | 758 | else if (plugin->behind_nat == GNUNET_YES) /* We are behind NAT, but will advertise NAT and normal addresses */ |
757 | { | 759 | { |