summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-19 20:31:12 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-19 20:31:12 +0100
commit3902d240e408e85f08d9c444356eb18fc6ea44e7 (patch)
treea92c4b953d8a719ebb8a9f567d053352bff9933b /src/transport
parent8802f213c67692abebebdf9fe2d4a77afe2b1fcb (diff)
mostly logging, avoid having more than one typemap in transmission queue, accept port=0 as not an error, tolerate link-local addrs
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/plugin_transport_udp.c15
-rw-r--r--src/transport/transport_api_core.c3
2 files changed, 5 insertions, 13 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index fd8493e5f..76132523b 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -1271,10 +1271,7 @@ udp_plugin_check_address (void *cls,
v6 = (const struct IPv6UdpAddress *) addr;
if (IN6_IS_ADDR_LINKLOCAL (&v6->ipv6_addr))
- {
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
- }
+ return GNUNET_OK; /* plausible, if unlikely... */
memset (&s6, 0, sizeof (s6));
s6.sin6_family = AF_INET6;
#if HAVE_SOCKADDR_IN_SIN_LEN
@@ -1338,10 +1335,7 @@ udp_nat_port_map_callback (void *cls,
GNUNET_assert (sizeof(struct sockaddr_in) == addrlen);
i4 = (const struct sockaddr_in *) addr;
if (0 == ntohs (i4->sin_port))
- {
- GNUNET_break (0);
- return;
- }
+ return; /* Port = 0 means unmapped, ignore these for UDP. */
memset (&u4,
0,
sizeof(u4));
@@ -1359,10 +1353,7 @@ udp_nat_port_map_callback (void *cls,
GNUNET_assert (sizeof(struct sockaddr_in6) == addrlen);
i6 = (const struct sockaddr_in6 *) addr;
if (0 == ntohs (i6->sin6_port))
- {
- GNUNET_break (0);
- return;
- }
+ return; /* Port = 0 means unmapped, ignore these for UDP. */
memset (&u6,
0,
sizeof(u6));
diff --git a/src/transport/transport_api_core.c b/src/transport/transport_api_core.c
index a693cb889..c99ade92f 100644
--- a/src/transport/transport_api_core.c
+++ b/src/transport/transport_api_core.c
@@ -447,7 +447,8 @@ mq_send_impl (struct GNUNET_MQ_Handle *mq,
GNUNET_MQ_send (h->mq,
n->env);
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Queued message for neighbour `%s'.\n",
+ "Queued message of type %u for neighbour `%s'.\n",
+ ntohs (msg->type),
GNUNET_i2s (&n->id));
}