From: Alexandr Anikin Date: Wed, 19 Feb 2014 10:41:01 +0000 (+0000) Subject: Allow different socket and signalling ip on h.323 connection if gk mode is active X-Git-Tag: 13.0.0-beta1~538 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac622442885a26551711bec3ec239093583833fc;p=thirdparty%2Fasterisk.git Allow different socket and signalling ip on h.323 connection if gk mode is active Reported by: Gabriele Odone Patches: ASTERISK-22738-1.patch Tested by: Gabriele Odone (closes issue ASTERISK-22738) ........ Merged revisions 408312 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 408314 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408315 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/addons/ooh323c/src/ooh323.c b/addons/ooh323c/src/ooh323.c index e7708af4aa..d91c64942c 100644 --- a/addons/ooh323c/src/ooh323.c +++ b/addons/ooh323c/src/ooh323.c @@ -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 */