From 731daf588fe49ffdf7b59816b840dc033b09a590 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 13 Feb 2017 10:29:11 +0100 Subject: [PATCH] pass correct pointer to GNUNET_NAT_register --- src/nat-auto/gnunet-nat-server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nat-auto/gnunet-nat-server.c b/src/nat-auto/gnunet-nat-server.c index dd08f8d36..371e4b27e 100644 --- a/src/nat-auto/gnunet-nat-server.c +++ b/src/nat-auto/gnunet-nat-server.c @@ -56,6 +56,7 @@ try_anat (uint32_t dst_ipv4, struct GNUNET_NAT_Handle *h; struct sockaddr_in lsa; struct sockaddr_in rsa; + const struct sockaddr *sa; socklen_t sa_len; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -77,11 +78,12 @@ try_anat (uint32_t dst_ipv4, rsa.sin_addr.s_addr = dst_ipv4; rsa.sin_port = htons (dport); sa_len = sizeof (lsa); + sa = (const struct sockaddr *) &lsa; h = GNUNET_NAT_register (cfg, "none", is_tcp ? IPPROTO_TCP : IPPROTO_UDP, 1, - (const struct sockaddr **) &lsa, + &sa, &sa_len, NULL, NULL, NULL); GNUNET_NAT_request_reversal (h, -- 2.25.1