]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Tue, 31 Oct 2006 10:21:42 +0000 (10:21 +0000)
committerAutomerge script <automerge@asterisk.org>
Tue, 31 Oct 2006 10:21:42 +0000 (10:21 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46627 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c
configs/sip.conf.sample

index be42558fcaeced9d4dacb0ea17339b596868f7e2..d2af27c668b80d92361f4cca4d2578cff835494b 100644 (file)
@@ -3974,7 +3974,7 @@ static int copy_via_headers(struct sip_pvt *p, struct sip_request *req, struct s
                                if (rport && *(rport+6) == '=') 
                                        rport = NULL;           /* We already have a parameter to rport */
 
-                               if (rport && (ast_test_flag(p, SIP_NAT) == SIP_NAT_ALWAYS)) {
+                               if (rport && ((ast_test_flag(p, SIP_NAT) == SIP_NAT_ALWAYS) || (ast_test_flag(p, SIP_NAT) == SIP_NAT_RFC3581))) {
                                        /* We need to add received port - rport */
                                        ast_copy_string(tmp, oh, sizeof(tmp));
 
@@ -6653,8 +6653,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)) {
index 889d959ea1b12303317eb773b3a56548221d8241..f080e149b468661aaeaf930507f6a963106fda73 100644 (file)
@@ -187,7 +187,7 @@ srvlookup=yes                       ; Enable DNS SRV lookups on outbound calls
 ;
 ;nat=no                                ; Global NAT settings  (Affects all peers and users)
                                 ; yes = Always ignore info and assume NAT
-                                ; no = Use NAT mode only according to RFC3581 
+                                ; no = Use NAT mode only according to RFC3581 (;rport)
                                 ; never = Never attempt NAT mode or RFC3581 support
                                ; route = Assume NAT, don't send rport 
                                ; (work around more UNIDEN bugs)