aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
10[transport] 10[transport]
11UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-8 11UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-8
12PORT = 20011 12PORT = 20011
13PLUGINS = tcp udp http_client https_client http_server https_server 13PLUGINS = tcp
14 14
15[transport-tcp] 15[transport-tcp]
16PORT = 20010 16PORT = 20010
17ADVERTISED_PORT = 20010 17ADVERTISED_PORT = 20010
18 18
19[transport-udp]
20PORT = 20009
21
22[transport-http_server]
23PORT = 20008
24
25[transport-https_server]
26PORT = 20007
27
28[hostlist] 19[hostlist]
29OPTIONS = -p 20OPTIONS = -p
30SERVERs = 21SERVERs =
31 22
32[nat] 23[nat]
33BEHIND_NAT = NO 24BEHIND_NAT = NO
@@ -94,6 +85,3 @@ PORT = 20001
94[nse] 85[nse]
95UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-nse-12 86UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-nse-12
96PORT = 20015 87PORT = 20015
97
98
99
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
10[transport] 10[transport]
11UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-50 11UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-50
12PORT = 20065 12PORT = 20065
13PLUGINS = tcp udp http_client https_client 13PLUGINS = tcp
14 14
15[transport-tcp] 15[transport-tcp]
16PORT = 0 16PORT = 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/
7PRIVATE_KEY = hostkeys/c_no_nat_client 7PRIVATE_KEY = hostkeys/c_no_nat_client
8 8
9[transport] 9[transport]
10PLUGINS = tcp udp http_client https_client 10PLUGINS = tcp
11UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-22 11UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-22
12PORT = 20029 12PORT = 20029
13 13
@@ -15,10 +15,6 @@ PORT = 20029
15PORT = 20028 15PORT = 20028
16ADVERTISED_PORT = 20028 16ADVERTISED_PORT = 20028
17 17
18[transport-udp]
19PORT = 20027
20BROADCAST_INTERVAL = 30 s
21
22[hostlist] 18[hostlist]
23SERVERS = http://localhost:8080/ 19SERVERS = http://localhost:8080/
24 20
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
8 8
9 9
10[transport] 10[transport]
11PLUGINS = tcp udp http_client https_client 11PLUGINS = tcp
12UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-22 12UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-transport-22
13PORT = 20039 13PORT = 20039
14 14
@@ -111,5 +111,3 @@ PORT = 20038
111[dv] 111[dv]
112UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-dv-36 112UNIXPATH = $GNUNET_RUNTIME_DIR/test-service-dv-36
113PORT = 20039 113PORT = 20039
114
115
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 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -1115,7 +1115,8 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
1115 } 1115 }
1116 ping = (const struct TransportPingMessage *) hdr; 1116 ping = (const struct TransportPingMessage *) hdr;
1117 if (0 != 1117 if (0 !=
1118 memcmp (&ping->target, &GST_my_identity, 1118 memcmp (&ping->target,
1119 &GST_my_identity,
1119 sizeof (struct GNUNET_PeerIdentity))) 1120 sizeof (struct GNUNET_PeerIdentity)))
1120 { 1121 {
1121 GNUNET_STATISTICS_update (GST_stats, 1122 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 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -1471,6 +1471,12 @@ tcp_nat_port_map_callback (void *cls,
1471 args = sizeof (t4); 1471 args = sizeof (t4);
1472 break; 1472 break;
1473 case AF_INET6: 1473 case AF_INET6:
1474 if (IN6_IS_ADDR_LINKLOCAL (&((struct sockaddr_in6 *) addr)->sin6_addr))
1475 {
1476 /* skip link local, we don't allow them in
1477 #tcp_plugin_check_address() */
1478 return;
1479 }
1474 GNUNET_assert(addrlen == sizeof(struct sockaddr_in6)); 1480 GNUNET_assert(addrlen == sizeof(struct sockaddr_in6));
1475 memset (&t6, 0, sizeof(t6)); 1481 memset (&t6, 0, sizeof(t6));
1476 GNUNET_memcpy (&t6.ipv6_addr, 1482 GNUNET_memcpy (&t6.ipv6_addr,