mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Make DNS callbacks return -1 on error, so invalid records are ignored
(bug #1137) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
4
srv.c
4
srv.c
@@ -79,8 +79,10 @@ static int srv_callback(void *context, u_char *answer, int len, u_char *fullansw
|
||||
{
|
||||
struct srv_context *c = (struct srv_context *)context;
|
||||
|
||||
if (parse_srv(c->host, c->hostlen, c->port, answer, len, fullanswer))
|
||||
if (parse_srv(c->host, c->hostlen, c->port, answer, len, fullanswer)) {
|
||||
ast_log(LOG_WARNING, "Failed to parse srv\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (strlen(c->host))
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user