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>
Fri, 15 Jun 2018 01:38:22 +0000 (10:38 +0900)
commit1c0b6681e4f322b88ac35d1f21c03d3cfc35fc23
tree5c9edf1c00afd76720a98d35fad84b8b4fb40baf
parent3e6ad302eaf3a4a9f3e60379133b3dfdbe0e1b2d
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.

--

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