From 3902d240e408e85f08d9c444356eb18fc6ea44e7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 19 Feb 2017 20:31:12 +0100 Subject: mostly logging, avoid having more than one typemap in transmission queue, accept port=0 as not an error, tolerate link-local addrs --- src/transport/plugin_transport_udp.c | 15 +++------------ src/transport/transport_api_core.c | 3 ++- 2 files changed, 5 insertions(+), 13 deletions(-) (limited to 'src/transport') 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)); } -- cgit v1.2.3