If peer fails ACL check, fail the REGISTER attempt

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Olle Johansson
2006-10-31 09:13:34 +00:00
parent 2405e775b1
commit e807fbcec5

View File

@@ -6566,8 +6566,10 @@ static int register_verify(struct sip_pvt *p, struct sockaddr_in *sin, struct si
build_contact(p);
peer = find_peer(name, NULL, 1);
if (!(peer && ast_apply_ha(peer->ha, sin))) {
/* Peer fails ACL check */
if (peer)
ASTOBJ_UNREF(peer,sip_destroy_peer);
peer = NULL;
}
if (peer) {
if (!ast_test_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC)) {