]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Allow different socket and signalling ip on h.323 connection if gk mode is active
authorAlexandr Anikin <may@telecom-service.ru>
Wed, 19 Feb 2014 10:15:46 +0000 (10:15 +0000)
committerAlexandr Anikin <may@telecom-service.ru>
Wed, 19 Feb 2014 10:15:46 +0000 (10:15 +0000)
Reported by: Gabriele Odone
Patches:
ASTERISK-22738-1.patch
Tested by: Gabriele Odone

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408312 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/ooh323c/src/ooh323.c

index e7708af4aaf69f0f67605179fabe1ef8dd1d0687..d91c64942c7b9191d254bddbdf7beb69b9e19f59 100644 (file)
@@ -535,11 +535,13 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
       }
    }
 
+/* Allow sourceCallSignallAddress different with socket IP for gk routed calls */
    if (strncmp(remoteIP, call->remoteIP, strlen(remoteIP))) {
-     OOTRACEERR5("ERROR: Security denial remote sig IP isn't a socket ip, %s not %s "
-                    "(%s, %s)\n", remoteIP, call->remoteIP, call->callType, 
-                    call->callToken);
-     return OO_FAILED;
+       if(!gH323ep.gkClient || OO_TESTFLAG(call->flags, OO_M_DISABLEGK) || (gH323ep.gkClient->state != GkClientRegistered)) {
+               OOTRACEERR5("ERROR: Security denial remote sig IP isn't a socket ip, %s not %s "
+                       "(%s, %s)\n", remoteIP, call->remoteIP, call->callType, call->callToken);
+               return OO_FAILED;
+       }
    }
    
    /* check for fast start */