diff options
author | Matthew Nicholson <mnicholson@digium.com> | 2010-06-16 20:34:31 +0000 |
---|---|---|
committer | Matthew Nicholson <mnicholson@digium.com> | 2010-06-16 20:34:31 +0000 |
commit | 9f1136143bad80bbd8222d8cf5856dbe363a61eb (patch) | |
tree | c771fc6b934da1b650eda5a9a89dc3551ac546ca /main/acl.c | |
parent | fcb055fb4ec3fb5918c03948dee3f1c7b65b31df (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: https://origsvn.digium.com/svn/asterisk/trunk@270974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/acl.c')
-rw-r--r-- | main/acl.c | 1 |
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); |