diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-26 19:41:30 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-26 19:41:30 +0000 |
commit | 722e3c7c23c83d192ea8869d08f11ecace228186 (patch) | |
tree | f890bfa83bb146d93a921d1d4f4c101b0107fbfa /channels | |
parent | b3ff5b9af718ea4bf39b12792bcf6f84f1a2bbf6 (diff) |
Merged revisions 225912 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r225912 | jpeeler | 2009-10-26 14:40:26 -0500 (Mon, 26 Oct 2009) | 12 lines
ACL check not present for verifying SIP INVITEs
The ACL check in check_peer_ok was missing and has now been restored. The
missing check allowed for calls to be made on prohibited networks where an ACL
was defined in sip.conf and the allowguest option was set to off. See the AST
security advisory below for more information.
Merge code associated with AST-2009-007.
(closes issue #16091)
Reported by: thom4fun
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@225913 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4cb323686..30503f8ed 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12913,7 +12913,11 @@ static enum check_auth_result check_peer_ok(struct sip_pvt *p, char *of, of, ast_inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port)); return AUTH_DONT_KNOW; } - + if (!ast_apply_ha(peer->ha, sin)) { + ast_debug(2, "Found peer '%s' for '%s', but fails host access\n", peer->name, of); + unref_peer(peer, "unref_peer: check_peer_ok: from find_peer call, early return of AUTH_ACL_FAILED"); + return AUTH_ACL_FAILED; + } if (debug) ast_verbose("Found peer '%s' for '%s' from %s:%d\n", peer->name, of, ast_inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port)); |