[asterisk-commits] jpeeler: tag 1.6.1.8 r225915 - /tags/1.6.1.8/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 26 14:42:44 CDT 2009


Author: jpeeler
Date: Mon Oct 26 14:42:39 2009
New Revision: 225915

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=225915
Log:
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

Modified:
    tags/1.6.1.8/channels/chan_sip.c

Modified: tags/1.6.1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/tags/1.6.1.8/channels/chan_sip.c?view=diff&rev=225915&r1=225914&r2=225915
==============================================================================
--- tags/1.6.1.8/channels/chan_sip.c (original)
+++ tags/1.6.1.8/channels/chan_sip.c Mon Oct 26 14:42:39 2009
@@ -12570,7 +12570,11 @@
 				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));




More information about the asterisk-commits mailing list