Don't lookup SRV's on IP addresses
authorMark Spencer <markster@digium.com>
Sun, 13 Feb 2005 19:55:28 +0000 (19:55 +0000)
committerMark Spencer <markster@digium.com>
Sun, 13 Feb 2005 19:55:28 +0000 (19:55 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5022 65c4cc65-6c06-0410-ace0-fbb531ad65f3

acl.c

diff --git a/acl.c b/acl.c
index 7042eee..7f2f9c7 100755 (executable)
--- a/acl.c
+++ b/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 host[256];
        int tportno = ntohs(sin->sin_port);
+       if (inet_aton(value, &sin->sin_addr))
+               return 0;
        if (service) {
                snprintf(srv, sizeof(srv), "%s.%s", service, value);
                if (ast_get_srv(NULL, host, sizeof(host), &tportno, srv) > 0) {