libdns: Clear struct sockaddr_storage by zero.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 15 Jun 2018 01:38:22 +0000 (10:38 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 18 Jun 2018 08:25:49 +0000 (17:25 +0900)
commit0c05b08e8b5c1f120fe5f3ed5c061f034f7496a0
tree39d5469509282fdcc7eb51626a044005eadc0b0a
parent20c289606f89803929948ddd18910acff2acc9eb
libdns: Clear struct sockaddr_storage by zero.

* dirmngr/dns.c (dns_resconf_pton): Clear SS.
(dns_resconf_setiface): Clear ->IFACE.
(dns_hints_root, send_query): Clear SS.

--

Cherry pick from master commit:
    1c0b6681e4f322b88ac35d1f21c03d3cfc35fc23

POSIX requires clear the structure of struct sockaddr_in6.  On macOS,
in some case like bind, it is better to clear even for struct
sockaddr_in.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
dirmngr/dns.c