diff options
Diffstat (limited to 'src/nat/libnatpmp/natpmp.c')
-rw-r--r-- | src/nat/libnatpmp/natpmp.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nat/libnatpmp/natpmp.c b/src/nat/libnatpmp/natpmp.c index 171911979..12526df8e 100644 --- a/src/nat/libnatpmp/natpmp.c +++ b/src/nat/libnatpmp/natpmp.c | |||
@@ -267,9 +267,13 @@ readnatpmpresponse (natpmp_t * p, natpmpresp_t * response) | |||
267 | { | 267 | { |
268 | response->type = buf[1] & 0x7f; | 268 | response->type = buf[1] & 0x7f; |
269 | if (buf[1] == 128) | 269 | if (buf[1] == 128) |
270 | //response->publicaddress.addr = *((uint32_t *)(buf + 8)); | 270 | { |
271 | response->pnu.publicaddress.addr.s_addr = | 271 | response->pnu.publicaddress.family = AF_INET; |
272 | *((uint32_t *) (buf + 8)); | 272 | memset (&response->pnu.publicaddress.addr6.s6_addr, 0, sizeof (struct in6_addr)); |
273 | response->pnu.publicaddress.addr.s_addr = | ||
274 | *((uint32_t *) (buf + 8)); | ||
275 | /* FIXME: support IPv6 address */ | ||
276 | } | ||
273 | else | 277 | else |
274 | { | 278 | { |
275 | response->pnu.newportmapping.privateport = | 279 | response->pnu.newportmapping.privateport = |