trying to improve things for #5560
authorChristian Grothoff <christian@grothoff.org>
Wed, 13 Feb 2019 22:42:29 +0000 (23:42 +0100)
committerChristian Grothoff <christian@grothoff.org>
Wed, 13 Feb 2019 22:42:29 +0000 (23:42 +0100)
src/integration-tests/confs/c_bootstrap_server.conf
src/integration-tests/confs/c_nat_client.conf
src/integration-tests/confs/c_no_nat_client.conf
src/integration-tests/confs/c_no_nat_client_2.conf
src/transport/gnunet-service-transport_validation.c
src/transport/plugin_transport_tcp.c

index bcfa6b212a12b40a0824eb597255de55c6c08e9e..0087d81311d6b081290e6fd16d815201507f8329 100644 (file)
@@ -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
-
-
-
index 0040a8dc00740f958708ef4ba7cf5db31587ec70..8ec2c60a08f9e82d44facb5a7e1cc454779895b2 100644 (file)
@@ -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
index 38a7d7fbc456c6bda5ead7c2e0d8314c11ae3adc..16e514b961d43ad0c98525b3368ad5eca9bb5240 100644 (file)
@@ -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/
 
index 6c8f07632d9d7bfb30103e523a39246ca7e5854f..cd952e36cb5e26e0e09de9bd864ee7cb6ad79a2d 100644 (file)
@@ -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
-
-
index 8d22d0c7af9606da824049841f76e561a6e5d0b8..6abe8d2d2db83d4b605bf9495ac2ef9644a0bf3c 100644 (file)
@@ -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,
index d93c4423c1e94086174067e33aa4eb3fc5e9f417..a0dd8061701545cfebcf854af1dc8b5e02dee01d 100644 (file)
@@ -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,