2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

4238. [bug] Don't send to servers on net zero (0.0.0.0/8).

[RT #40947]
This commit is contained in:
Mark Andrews
2015-10-16 08:00:15 +11:00
parent 567196d10a
commit 6588a2b404
9 changed files with 108 additions and 0 deletions

View File

@@ -483,6 +483,17 @@ isc_sockaddr_islinklocal(const isc_sockaddr_t *sockaddr) {
return (ISC_FALSE);
}
isc_boolean_t
isc_sockaddr_isnetzero(const isc_sockaddr_t *sockaddr) {
isc_netaddr_t netaddr;
if (sockaddr->type.sa.sa_family == AF_INET) {
isc_netaddr_fromsockaddr(&netaddr, sockaddr);
return (isc_netaddr_isnetzero(&netaddr));
}
return (ISC_FALSE);
}
isc_result_t
isc_sockaddr_frompath(isc_sockaddr_t *sockaddr, const char *path) {
#ifdef ISC_PLATFORM_HAVESYSUNH