From: Moon Date: Sun, 25 Oct 2009 12:22:25 +0000 (+0000) Subject: fix copying in6_addr X-Git-Tag: initial-import-from-subversion-38251~23259 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=930b614d5d8907f7f9499427e74457cd16f620a2;p=oweals%2Fgnunet.git fix copying in6_addr --- diff --git a/src/nat/libnatpmp/getgateway.c b/src/nat/libnatpmp/getgateway.c index 919aee65f..4ac5ace0e 100644 --- a/src/nat/libnatpmp/getgateway.c +++ b/src/nat/libnatpmp/getgateway.c @@ -347,7 +347,7 @@ getdefaultgateway (int *af, u_int8_t addr[16]) } else if (gate != NULL && gate->sa_family == AF_INET6) { - *addr = ((struct sockaddr_in6 *) gate)->sin6_addr.s6_addr; + memcpy (addr, ((struct sockaddr_in6 *) gate)->sin6_addr.s6_addr, 16 * sizeof (u_int8_t)); *af = AF_INET6; return SUCCESS; }