summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-02-13 23:42:29 +0100
committerChristian Grothoff <christian@grothoff.org>2019-02-13 23:42:29 +0100
commita2de1176e7872185a8a6b0ce7cbc93bf30f0b395 (patch)
treec5bb96fcce38d380aa488ef6babc11d679d06395 /src
parent5ad1c50a13484450f71e4b248f08fd2c6a369d6d (diff)
trying to improve things for #5560
Diffstat (limited to 'src')
-rw-r--r--src/integration-tests/confs/c_bootstrap_server.conf16
-rw-r--r--src/integration-tests/confs/c_nat_client.conf2
-rw-r--r--src/integration-tests/confs/c_no_nat_client.conf6
-rw-r--r--src/integration-tests/confs/c_no_nat_client_2.conf4
-rw-r--r--src/transport/gnunet-service-transport_validation.c5
-rw-r--r--src/transport/plugin_transport_tcp.c8
6 files changed, 15 insertions, 26 deletions
diff --git a/src/integration-tests/confs/c_bootstrap_server.conf b/src/integration-tests/confs/c_bootstrap_server.conf
index bcfa6b212..0087d8131 100644
--- a/src/integration-tests/confs/c_bootstrap_server.conf
+++ b/src/integration-tests/confs/c_bootstrap_server.conf
@@ -10,24 +10,15 @@ PRIVATE_KEY = hostkeys/c_bootstrap_server
[transport]
UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-8
PORT = 20011
-PLUGINS = tcp udp http_client https_client http_server https_server
+PLUGINS = tcp
[transport-tcp]
PORT = 20010
ADVERTISED_PORT = 20010
-[transport-udp]
-PORT = 20009
-
-[transport-http_server]
-PORT = 20008
-
-[transport-https_server]
-PORT = 20007
-
[hostlist]
OPTIONS = -p
-SERVERs =
+SERVERs =
[nat]
BEHIND_NAT = NO
@@ -94,6 +85,3 @@ PORT = 20001
[nse]
UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-nse-12
PORT = 20015
-
-
-
diff --git a/src/integration-tests/confs/c_nat_client.conf b/src/integration-tests/confs/c_nat_client.conf
index 0040a8dc0..8ec2c60a0 100644
--- a/src/integration-tests/confs/c_nat_client.conf
+++ b/src/integration-tests/confs/c_nat_client.conf
@@ -10,7 +10,7 @@ PRIVATE_KEY = hostkeys/c_nat_client
[transport]
UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-50
PORT = 20065
-PLUGINS = tcp udp http_client https_client
+PLUGINS = tcp
[transport-tcp]
PORT = 0
diff --git a/src/integration-tests/confs/c_no_nat_client.conf b/src/integration-tests/confs/c_no_nat_client.conf
index 38a7d7fbc..16e514b96 100644
--- a/src/integration-tests/confs/c_no_nat_client.conf
+++ b/src/integration-tests/confs/c_no_nat_client.conf
@@ -7,7 +7,7 @@ GNUNET_TEST_HOME = $GNUNET_TMP/c_no_nat_client/
PRIVATE_KEY = hostkeys/c_no_nat_client
[transport]
-PLUGINS = tcp udp http_client https_client
+PLUGINS = tcp
UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-22
PORT = 20029
@@ -15,10 +15,6 @@ PORT = 20029
PORT = 20028
ADVERTISED_PORT = 20028
-[transport-udp]
-PORT = 20027
-BROADCAST_INTERVAL = 30 s
-
[hostlist]
SERVERS = http://localhost:8080/
diff --git a/src/integration-tests/confs/c_no_nat_client_2.conf b/src/integration-tests/confs/c_no_nat_client_2.conf
index 6c8f07632..cd952e36c 100644
--- a/src/integration-tests/confs/c_no_nat_client_2.conf
+++ b/src/integration-tests/confs/c_no_nat_client_2.conf
@@ -8,7 +8,7 @@ PRIVATE_KEY = hostkeys/c_no_nat_client_2
[transport]
-PLUGINS = tcp udp http_client https_client
+PLUGINS = tcp
UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-22
PORT = 20039
@@ -111,5 +111,3 @@ PORT = 20038
[dv]
UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-dv-36
PORT = 20039
-
-
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index 8d22d0c7a..6abe8d2d2 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -11,7 +11,7 @@
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -1115,7 +1115,8 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
}
ping = (const struct TransportPingMessage *) hdr;
if (0 !=
- memcmp (&ping->target, &GST_my_identity,
+ memcmp (&ping->target,
+ &GST_my_identity,
sizeof (struct GNUNET_PeerIdentity)))
{
GNUNET_STATISTICS_update (GST_stats,
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index d93c4423c..a0dd80617 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -11,7 +11,7 @@
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -1471,6 +1471,12 @@ tcp_nat_port_map_callback (void *cls,
args = sizeof (t4);
break;
case AF_INET6:
+ if (IN6_IS_ADDR_LINKLOCAL (&((struct sockaddr_in6 *) addr)->sin6_addr))
+ {
+ /* skip link local, we don't allow them in
+ #tcp_plugin_check_address() */
+ return;
+ }
GNUNET_assert(addrlen == sizeof(struct sockaddr_in6));
memset (&t6, 0, sizeof(t6));
GNUNET_memcpy (&t6.ipv6_addr,