aboutsummaryrefslogtreecommitdiff
path: root/src/nat/gnunet-nat.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-02 09:47:37 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-02 09:47:37 +0100
commit1082a8e39e4f3d9b908b14995653ac262f640adb (patch)
tree7f9228753dd499d819916f69193804406e196fba /src/nat/gnunet-nat.c
parentab31d0d5b13f9361f6312c4eadbb2054922b1a61 (diff)
downloadgnunet-1082a8e39e4f3d9b908b14995653ac262f640adb.tar.gz
gnunet-1082a8e39e4f3d9b908b14995653ac262f640adb.zip
improve/fix handling of NAT server logic for ICMP-based autonomous NAT traversal
Diffstat (limited to 'src/nat/gnunet-nat.c')
-rw-r--r--src/nat/gnunet-nat.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c
index 4d0ed5723..a145dc800 100644
--- a/src/nat/gnunet-nat.c
+++ b/src/nat/gnunet-nat.c
@@ -338,15 +338,11 @@ address_cb (void *cls,
338 * reversal. 338 * reversal.
339 * 339 *
340 * @param cls closure, NULL 340 * @param cls closure, NULL
341 * @param local_addr address where we received the request
342 * @param local_addrlen actual length of the @a local_addr
343 * @param remote_addr public IP address of the other peer 341 * @param remote_addr public IP address of the other peer
344 * @param remote_addrlen actual length of the @a remote_addr 342 * @param remote_addrlen actual length of the @a remote_addr
345 */ 343 */
346static void 344static void
347reversal_cb (void *cls, 345reversal_cb (void *cls,
348 const struct sockaddr *local_addr,
349 socklen_t local_addrlen,
350 const struct sockaddr *remote_addr, 346 const struct sockaddr *remote_addr,
351 socklen_t remote_addrlen) 347 socklen_t remote_addrlen)
352{ 348{
@@ -580,6 +576,14 @@ run (void *cls,
580 (listen_reversal) ? &reversal_cb : NULL, 576 (listen_reversal) ? &reversal_cb : NULL,
581 NULL); 577 NULL);
582 } 578 }
579 else if (listen_reversal)
580 {
581 GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
582 "Use of `-W` only effective in combination with `-i`\n");
583 global_ret = 1;
584 GNUNET_SCHEDULER_shutdown ();
585 return;
586 }
583 587
584 if (NULL != remote_addr) 588 if (NULL != remote_addr)
585 { 589 {