summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cbabad0)
raw | patch | inline | side by side (parent: cbabad0)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 1 Nov 2006 08:43:35 +0000 (09:43 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 1 Nov 2006 08:43:35 +0000 (09:43 +0100) |
Thanks to Lubos Stanek for pointing me in the right direction :)
src/ntpd.c | patch | blob | history |
diff --git a/src/ntpd.c b/src/ntpd.c
index fc76a2459130619f47219b873b9e551df620201d..d65d1ed9e60c2e42c46bc6b404fe58559b162afa 100644 (file)
--- a/src/ntpd.c
+++ b/src/ntpd.c
if (ptr->v6_flag)
{
- status = getnameinfo ((const struct sockaddr *) &ptr->srcadr6,
- sizeof (ptr->srcadr6),
+ struct sockaddr_in6 sa;
+
+ memset (&sa, 0, sizeof (sa));
+ sa.sin6_family = AF_INET6;
+ sa.sin6_port = htons (123);
+ memcpy (&sa.sin6_addr, &ptr->srcadr6, sizeof (struct in6_addr));
+
+ status = getnameinfo ((const struct sockaddr *) &sa,
+ sizeof (sa),
peername, sizeof (peername),
NULL, 0, 0 /* no flags */);
if (status != 0)