aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-communicator-udp.c
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2022-10-04 14:28:51 +0200
committert3sserakt <t3ss@posteo.de>2022-10-05 13:23:32 +0200
commit247230d737e3e4709392148bfabbde25871b6914 (patch)
treec18f51cafb00b9436af050fffbc7d56d3f09bf95 /src/transport/gnunet-communicator-udp.c
parentb47e578091e7451fd5c98cc56447d0fadba15b00 (diff)
downloadgnunet-247230d737e3e4709392148bfabbde25871b6914.tar.gz
gnunet-247230d737e3e4709392148bfabbde25871b6914.zip
- Added distance vector inverse path test case.
- Enhanced port forwarding configuration to restrict port forwarding to specific source IPs. - Add configuration for counting additional connections per peer. - Added caching for Core Messages, if confirmed virtual link is missing. - Added caching for DV forwarding, if confirmed virtual link is missing. - Fixed bug in fragmentation logic. - Fixed bug in queueing logic. - Fixed bug in flow control logic. - Fixed Bug with lifetime of DV learn message. (Validation against replay attack still missing) - removed make warnings - fixed coverty findings
Diffstat (limited to 'src/transport/gnunet-communicator-udp.c')
-rw-r--r--src/transport/gnunet-communicator-udp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/transport/gnunet-communicator-udp.c b/src/transport/gnunet-communicator-udp.c
index 70848ff79..07beeac38 100644
--- a/src/transport/gnunet-communicator-udp.c
+++ b/src/transport/gnunet-communicator-udp.c
@@ -1723,7 +1723,7 @@ try_handle_plaintext (struct SenderAddress *sender,
1723 uint16_t type; 1723 uint16_t type;
1724 1724
1725 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1725 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1726 "try_handle_plaintext of size %u (%u %u) and type %u\n", 1726 "try_handle_plaintext of size %lu (%u %lu) and type %u\n",
1727 buf_size, 1727 buf_size,
1728 ntohs (hdr->size), 1728 ntohs (hdr->size),
1729 sizeof(*hdr), 1729 sizeof(*hdr),
@@ -2394,6 +2394,7 @@ sock_read (void *cls)
2394 GNUNET_i2s (&sender)); 2394 GNUNET_i2s (&sender));
2395 GNUNET_TRANSPORT_application_validate (ah, &sender, nt, addr_s); 2395 GNUNET_TRANSPORT_application_validate (ah, &sender, nt, addr_s);
2396 GNUNET_free (addr_s); 2396 GNUNET_free (addr_s);
2397 GNUNET_free (addr_verify);
2397 return; 2398 return;
2398 } 2399 }
2399 else 2400 else
@@ -2589,6 +2590,8 @@ udp_address_to_sockaddr (const char *bindto, socklen_t *sock_len)
2589 { 2590 {
2590 /* try IPv4 */ 2591 /* try IPv4 */
2591 struct sockaddr_in v4; 2592 struct sockaddr_in v4;
2593
2594 memset (&v4, 0, sizeof(v4));
2592 if (1 == inet_pton (AF_INET, cp, &v4.sin_addr)) 2595 if (1 == inet_pton (AF_INET, cp, &v4.sin_addr))
2593 { 2596 {
2594 v4.sin_family = AF_INET; 2597 v4.sin_family = AF_INET;
@@ -2607,6 +2610,7 @@ udp_address_to_sockaddr (const char *bindto, socklen_t *sock_len)
2607 struct sockaddr_in6 v6; 2610 struct sockaddr_in6 v6;
2608 const char *start; 2611 const char *start;
2609 2612
2613 memset (&v6, 0, sizeof(v6));
2610 start = cp; 2614 start = cp;
2611 if (('[' == *cp) && (']' == cp[strlen (cp) - 1])) 2615 if (('[' == *cp) && (']' == cp[strlen (cp) - 1]))
2612 { 2616 {