From 5e041b56a98c49a944804420ad53e18707c9f823 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 18 Jan 2022 21:55:13 +0100 Subject: -got basics to work with dhtu and udp+ip underlay --- src/dhtu/plugin_dhtu_ip.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/dhtu') diff --git a/src/dhtu/plugin_dhtu_ip.c b/src/dhtu/plugin_dhtu_ip.c index 617f722b5..2f6d6161e 100644 --- a/src/dhtu/plugin_dhtu_ip.c +++ b/src/dhtu/plugin_dhtu_ip.c @@ -809,7 +809,7 @@ read_cb (void *cls) (cmsg->cmsg_level == IPPROTO_IPV6), cmsg->cmsg_type, (cmsg->cmsg_type == IP_PKTINFO), - (cmsg->cmsg_type == IPV6_RECVPKTINFO)); + (cmsg->cmsg_type == IPV6_PKTINFO)); if ( (cmsg->cmsg_level == IPPROTO_IP) && (cmsg->cmsg_type == IP_PKTINFO) ) { @@ -824,7 +824,8 @@ read_cb (void *cls) { struct sockaddr_in sa = { .sin_family = AF_INET, - .sin_addr = pi.ipi_addr + .sin_addr = pi.ipi_addr, + .sin_port = htons (plugin->port16) }; src = find_source (plugin, @@ -837,7 +838,7 @@ read_cb (void *cls) GNUNET_break (0); } if ( (cmsg->cmsg_level == IPPROTO_IPV6) && - (cmsg->cmsg_type == IPV6_RECVPKTINFO) ) + (cmsg->cmsg_type == IPV6_PKTINFO) ) { if (CMSG_LEN (sizeof (struct in6_pktinfo)) == cmsg->cmsg_len) @@ -851,6 +852,7 @@ read_cb (void *cls) struct sockaddr_in6 sa = { .sin6_family = AF_INET6, .sin6_addr = pi.ipi6_addr, + .sin6_port = htons (plugin->port16), .sin6_scope_id = pi.ipi6_ifindex }; @@ -880,8 +882,8 @@ read_cb (void *cls) return; } plugin->env->receive_cb (plugin->env->cls, - dst->app_ctx, - src->app_ctx, + &dst->app_ctx, + &src->app_ctx, &buf[sizeof(*pid)], ret - sizeof (*pid)); } -- cgit v1.2.3