diff options
author | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-03 03:12:59 +0000 |
---|---|---|
committer | citats <citats@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-03 03:12:59 +0000 |
commit | 0a96ddcf480c98b32ce03b03fcdeef0c4f467e6d (patch) | |
tree | 8f577d0cdf725a2005a717e8946d82be97606aab /srv.c | |
parent | 15053dac45e009b1474e6619333ae1039ee0afcf (diff) |
Make DNS callbacks return -1 on error, so invalid records are ignored
(bug #1137)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2311 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'srv.c')
-rwxr-xr-x | srv.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |