mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Don't lookup SRV's on IP addresses
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
acl.c
2
acl.c
@@ -207,6 +207,8 @@ int ast_get_ip_or_srv(struct sockaddr_in *sin, const char *value, const char *se
|
|||||||
char srv[256];
|
char srv[256];
|
||||||
char host[256];
|
char host[256];
|
||||||
int tportno = ntohs(sin->sin_port);
|
int tportno = ntohs(sin->sin_port);
|
||||||
|
if (inet_aton(value, &sin->sin_addr))
|
||||||
|
return 0;
|
||||||
if (service) {
|
if (service) {
|
||||||
snprintf(srv, sizeof(srv), "%s.%s", service, value);
|
snprintf(srv, sizeof(srv), "%s.%s", service, value);
|
||||||
if (ast_get_srv(NULL, host, sizeof(host), &tportno, srv) > 0) {
|
if (ast_get_srv(NULL, host, sizeof(host), &tportno, srv) > 0) {
|
||||||
|
Reference in New Issue
Block a user