gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: use #5553 function in TCP/U


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: use #5553 function in TCP/UDP communicators
Date: Sat, 02 Mar 2019 11:21:10 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 1b1edf92c use #5553 function in TCP/UDP communicators
1b1edf92c is described below

commit 1b1edf92c24f91c36747458e880e0d6a5e559e95
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Mar 2 11:21:06 2019 +0100

    use #5553 function in TCP/UDP communicators
---
 src/transport/gnunet-communicator-tcp.c | 13 ++++++-------
 src/transport/gnunet-communicator-udp.c | 13 ++++++-------
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/src/transport/gnunet-communicator-tcp.c 
b/src/transport/gnunet-communicator-tcp.c
index 47bffa2ba..95719852c 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -24,7 +24,6 @@
  * @author Christian Grothoff
  *
  * TODO:
- * - add and use util/ check for IPv6 availability (#5553)
  * - support DNS names in BINDTO option (#5528)
  * - support NAT connection reversal method (#5529)
  * - support other TCP-specific NAT traversal methods (#5531)
@@ -1172,12 +1171,12 @@ tcp_address_to_sockaddr (const char *bindto,
                  bindto);
       return NULL;
     }
-    /* FIXME: add test to util/ for IPv6 availability,
-       and depending on the result, go directly for v4-only */
-    if (GNUNET_YES ==
-       GNUNET_CONFIGURATION_get_value_yesno (cfg,
-                                             COMMUNICATOR_CONFIG_SECTION,
-                                             "DISABLE_V6"))
+    if ( (GNUNET_NO ==
+         GNUNET_NETWORK_test_pf (PF_INET6)) ||
+        (GNUNET_YES ==
+         GNUNET_CONFIGURATION_get_value_yesno (cfg,
+                                               COMMUNICATOR_CONFIG_SECTION,
+                                               "DISABLE_V6")) )
     {
       struct sockaddr_in *i4;
 
diff --git a/src/transport/gnunet-communicator-udp.c 
b/src/transport/gnunet-communicator-udp.c
index 550ba7c85..fa8eb6acb 100644
--- a/src/transport/gnunet-communicator-udp.c
+++ b/src/transport/gnunet-communicator-udp.c
@@ -24,7 +24,6 @@
  * @author Christian Grothoff
  *
  * TODO:
- * - add and use util/ check for IPv6 availability (#5553)
  * - consider imposing transmission limits in the absence
  *   of ACKs; or: maybe this should be done at TNG service level?
  *   (at least the receiver might want to enforce limits on
@@ -1784,12 +1783,12 @@ udp_address_to_sockaddr (const char *bindto,
                  bindto);
       return NULL;
     }
-    /* FIXME #V6: add test to util/ for IPv6 availability,
-       and depending on the result, go directly for v4-only */
-    if (GNUNET_YES ==
-       GNUNET_CONFIGURATION_get_value_yesno (cfg,
-                                             COMMUNICATOR_CONFIG_SECTION,
-                                             "DISABLE_V6"))
+    if ( (GNUNET_NO ==
+         GNUNET_NETWORK_test_pf (PF_INET6)) ||
+        (GNUNET_YES ==
+         GNUNET_CONFIGURATION_get_value_yesno (cfg,
+                                               COMMUNICATOR_CONFIG_SECTION,
+                                               "DISABLE_V6")) )
     {
       struct sockaddr_in *i4;
       

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]