aboutsummaryrefslogtreecommitdiffstats
path: root/main/acl.c
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-16 20:34:31 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-16 20:34:31 +0000
commitdb405545aed92ad37e37dd761964bf4f604ad676 (patch)
treec771fc6b934da1b650eda5a9a89dc3551ac546ca /main/acl.c
parent497bf0b92cad547930d1846fe2d23d3430a4316a (diff)
Set sin_family to AF_INET when doing lookups, also reset sin_port the first time the ip address changes.
(closes issue #17496) Reported by: ManChicken (closes issue #15827) Reported by: DennisD Patches: dnsmgr_15827.patch uploaded by chappell (license 8) Tested by: DennisD, gentlec, damage, wimpy git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270974 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/acl.c')
-rw-r--r--main/acl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/acl.c b/main/acl.c
index 67c05b03c..caa1d56f0 100644
--- a/main/acl.c
+++ b/main/acl.c
@@ -387,6 +387,7 @@ int ast_get_ip_or_srv(struct sockaddr_in *sin, const char *value, const char *se
}
}
if ((hp = ast_gethostbyname(value, &ahp))) {
+ sin->sin_family = hp->h_addrtype;
memcpy(&sin->sin_addr, hp->h_addr, sizeof(sin->sin_addr));
} else {
ast_log(LOG_WARNING, "Unable to lookup '%s'\n", value);