projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a12a7f3
)
define nat port
author
Nathan S. Evans
<evans@in.tum.de>
Wed, 23 Jun 2010 08:34:49 +0000
(08:34 +0000)
committer
Nathan S. Evans
<evans@in.tum.de>
Wed, 23 Jun 2010 08:34:49 +0000
(08:34 +0000)
src/transport/plugin_transport_udp.c
patch
|
blob
|
history
diff --git
a/src/transport/plugin_transport_udp.c
b/src/transport/plugin_transport_udp.c
index 434fd9ba19e412f27e97c6c81b97fc135bab24f3..71f1dd1903121086613299ee2825d4b9e9accd2c 100644
(file)
--- a/
src/transport/plugin_transport_udp.c
+++ b/
src/transport/plugin_transport_udp.c
@@
-61,6
+61,8
@@
*/
#define UDP_DIRECT_DISTANCE 1
*/
#define UDP_DIRECT_DISTANCE 1
+#define DEFAULT_NAT_PORT 0
+
/**
* How long until we give up on transmitting the welcome message?
*/
/**
* 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 = (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 */
{
}
else if (plugin->behind_nat == GNUNET_YES) /* We are behind NAT, but will advertise NAT and normal addresses */
{