summaryrefslogtreecommitdiffstats
path: root/contrib/unbound/compat/fake-rfc2553.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2015-07-06 13:23:27 +0000
committerdes <des@FreeBSD.org>2015-07-06 13:23:27 +0000
commita060063a487e71aee85b154308b20e3c3d050c54 (patch)
tree78e508412e7aed4056295e6af1335856834fc7e3 /contrib/unbound/compat/fake-rfc2553.c
parentc49abb198d367256a94da48fed297b82b5a11ad9 (diff)
downloadFreeBSD-src-a060063a487e71aee85b154308b20e3c3d050c54.zip
FreeBSD-src-a060063a487e71aee85b154308b20e3c3d050c54.tar.gz
MFH (r276605, r282089): upgrade to latest Unbound
MFH (r276699, r276702, r277057): local control socket MFH (r276599, r276612, r282087, r282088): build fixes This brings in Unbound 1.5.3 from head. Local control sockets are now supported and will be used by default for new installations. Existing systems will continue to use TCP control sockets until the automated setup script is re-run ("service local_unbound setup") and the service restarted ("service local_unbound restart"). Approved by: re (kib) Relnotes: yes
Diffstat (limited to 'contrib/unbound/compat/fake-rfc2553.c')
-rw-r--r--contrib/unbound/compat/fake-rfc2553.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/contrib/unbound/compat/fake-rfc2553.c b/contrib/unbound/compat/fake-rfc2553.c
index 91ddf8a..0f0f34f 100644
--- a/contrib/unbound/compat/fake-rfc2553.c
+++ b/contrib/unbound/compat/fake-rfc2553.c
@@ -120,12 +120,10 @@ addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints)
{
struct addrinfo *ai;
- ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in));
+ ai = calloc(1, sizeof(*ai) + sizeof(struct sockaddr_in));
if (ai == NULL)
return (NULL);
- memset(ai, '\0', sizeof(*ai) + sizeof(struct sockaddr_in));
-
ai->ai_addr = (struct sockaddr *)(ai + 1);
/* XXX -- ssh doesn't use sa_len */
ai->ai_addrlen = sizeof(struct sockaddr_in);
OpenPOWER on IntegriCloud