]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If peer fails ACL check, fail the REGISTER attempt
authorOlle Johansson <oej@edvina.net>
Tue, 31 Oct 2006 09:13:34 +0000 (09:13 +0000)
committerOlle Johansson <oej@edvina.net>
Tue, 31 Oct 2006 09:13:34 +0000 (09:13 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46604 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 08e340866645b5bbd6bb4120fd8bec640714d22c..2ec0cb336028bb32ee44d69a471ed97ca5e97b73 100644 (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)) {