summaryrefslogtreecommitdiff
path: root/src/nat-auto
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-13 10:29:11 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-13 10:29:11 +0100
commit731daf588fe49ffdf7b59816b840dc033b09a590 (patch)
treef90ec7af50fe2e1affabb51bd3c0c51cb0a4fb0b /src/nat-auto
parentfc9aaa8bce69413e9d6426b1221e419bd58a7e63 (diff)
pass correct pointer to GNUNET_NAT_register
Diffstat (limited to 'src/nat-auto')
-rw-r--r--src/nat-auto/gnunet-nat-server.c4
1 files changed, 3 insertions, 1 deletions
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,