socket-dynamic: Properly initialize IPv6 address
authorTobias Brunner <tobias@strongswan.org>
Wed, 24 Jul 2013 08:36:49 +0000 (10:36 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 24 Jul 2013 14:17:22 +0000 (16:17 +0200)
src/libcharon/plugins/socket_dynamic/socket_dynamic_socket.c

index aecbd52..abbc8ba 100644 (file)
@@ -398,7 +398,7 @@ static int open_socket(private_socket_dynamic_socket_t *this,
                        break;
                case AF_INET6:
                        addr.sin6.sin6_family = AF_INET6;
-                       memset(&addr.sin6.sin6_addr, 0, sizeof(addr.sin6));
+                       memset(&addr.sin6.sin6_addr, 0, sizeof(addr.sin6.sin6_addr));
                        addr.sin6.sin6_port = htons(*port);
                        addrlen = sizeof(addr.sin6);
                        sol = SOL_IPV6;