[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated (7873611 -> fe7e93c)
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated (7873611 -> fe7e93c) |
Date: |
Sat, 07 Jan 2017 13:05:33 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a change to branch master
in repository gnunet.
from 7873611 was tested
new 76b387a fix free of statically allocated value
new fe7e93c fixing uninit sin_addr; now successfully tested external hole
punching support in new NAT code; documenting options to be used in the future
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/nat/gnunet-nat.c | 4 +++-
src/nat/gnunet-service-nat.c | 2 +-
src/transport/transport.conf.in | 40 ++++++++++++++++++++++++++++++++++++++--
3 files changed, 42 insertions(+), 4 deletions(-)
diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c
index 07ddfb6..f198adc 100644
--- a/src/nat/gnunet-nat.c
+++ b/src/nat/gnunet-nat.c
@@ -37,7 +37,7 @@ static int global_ret;
* Name of section in configuration file to use for
* additional options.
*/
-static char *section_name = "undefined";
+static char *section_name;
/**
* Flag set to 1 if we use IPPROTO_UDP.
@@ -300,6 +300,8 @@ run (void *cls,
if (NULL != local_addr)
{
+ if (NULL == section_name)
+ section_name = GNUNET_strdup ("undefined");
nh = GNUNET_NAT_register (c,
section_name,
proto,
diff --git a/src/nat/gnunet-service-nat.c b/src/nat/gnunet-service-nat.c
index a8a824b..b3e8112 100644
--- a/src/nat/gnunet-service-nat.c
+++ b/src/nat/gnunet-service-nat.c
@@ -28,7 +28,6 @@
* knowledge about the local network topology.
*
* TODO:
- * - test manual hole punching support
* - adapt existing transports to use new NAT logic
* - abandon legacy NAT code
*
@@ -863,6 +862,7 @@ notify_client_external_ipv4_change (void *cls,
s4 = (struct sockaddr_in *) &lal.addr;
s4->sin_family = AF_INET;
s4->sin_port = htons (ch->ext_dns_port);
+ s4->sin_addr = *v4;
lal.af = AF_INET;
lal.ac = GNUNET_NAT_AC_GLOBAL | GNUNET_NAT_AC_MANUAL;
check_notify_client (&lal,
diff --git a/src/transport/transport.conf.in b/src/transport/transport.conf.in
index 4e9f17f..7b5413b 100644
--- a/src/transport/transport.conf.in
+++ b/src/transport/transport.conf.in
@@ -38,7 +38,17 @@ TESTING_IGNORE_KEYS = ACCEPT_FROM;
[transport-tcp]
# Use 0 to ONLY advertise as a peer behind NAT (no port binding)
PORT = 2086
+
+# Obsolete option, to be replaced by HOLE_EXTERNAL (soon)
ADVERTISED_PORT = 2086
+
+# If we have a manually punched NAT, what is the external IP and port?
+# Can use DNS names for DynDNS-based detection of external IP.
+# Can use IPv6 addresses ([fefc::]:PORT).
+# Use "AUTO" for the hostname to automatically detect external IP.
+# Do not set if NAT is not manually punched.
+# HOLE_EXTERNAL = AUTO:2086
+
TESTING_IGNORE_KEYS = ACCEPT_FROM;
# Maximum number of open TCP connections allowed
@@ -72,8 +82,13 @@ BROADCAST_INTERVAL = 30 s
MAX_BPS = 1000000
TESTING_IGNORE_KEYS = ACCEPT_FROM;
-# Configuration for manually punched holes in NAT.
-# HOLE_EXTERNAL = auto:2086
+# If we have a manually punched NAT, what is the external IP and port?
+# Can use DNS names for DynDNS-based detection of external IP.
+# Can use IPv6 addresses ([fefc::]:PORT).
+# Use "AUTO" for the hostname to automatically detect external IP.
+# Do not set if NAT is not manually punched.
+# HOLE_EXTERNAL = AUTO:2086
+
[transport-http_client]
MAX_CONNECTIONS = 128
@@ -98,7 +113,18 @@ TESTING_IGNORE_KEYS = ACCEPT_FROM;
[transport-http_server]
#EXTERNAL_HOSTNAME = <your hostname/path>
PORT = 1080
+
+# Obsolete option, to be replaced by HOLE_EXTERNAL (soon)
ADVERTISED_PORT = 1080
+
+# If we have a manually punched NAT, what is the external IP and port?
+# Can use DNS names for DynDNS-based detection of external IP.
+# Can use IPv6 addresses ([fefc::]:PORT).
+# Use "AUTO" for the hostname to automatically detect external IP.
+# Do not set if NAT is not manually punched.
+# HOLE_EXTERNAL = AUTO:2086
+
+
MAX_CONNECTIONS = 128
TESTING_IGNORE_KEYS = ACCEPT_FROM;
@@ -139,7 +165,17 @@ TESTING_IGNORE_KEYS = ACCEPT_FROM;
# Does the external hostname use the same port?
# EXTERNAL_HOSTNAME_USE_PORT = YES
PORT = 4433
+
+# Obsolete option, to be replaced by HOLE_EXTERNAL (soon)
ADVERTISED_PORT = 4433
+
+# If we have a manually punched NAT, what is the external IP and port?
+# Can use DNS names for DynDNS-based detection of external IP.
+# Can use IPv6 addresses ([fefc::]:PORT).
+# Use "AUTO" for the hostname to automatically detect external IP.
+# Do not set if NAT is not manually punched.
+# HOLE_EXTERNAL = AUTO:2086
+
CRYPTO_INIT = NORMAL
KEY_FILE = $GNUNET_DATA_HOME/transport/https.key
CERT_FILE = $GNUNET_DATA_HOME/transport/https.cert
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (7873611 -> fe7e93c),
gnunet <=