The ITU specs do not define behaviour when processing LRQ without hopCount field. Currently, GnuGk behaves like it would be LRQ with hopCount = 1. It check its internal registration table whether the destination is registered at this gatekeeper, but does not forward LRQ further. But maybe it will be a better solution to include hopCount field when it is not present in the LRQ received, before forwarding it to neighbors. This will prevent endless LRQ loops. I would modify the patch further to set hopCount = ForwardHopCount, when ForwardLRQ=always or ForwardLRQ=depends and hopCount field is missing. ----- Original Message ----- From: "Thomas" <thomasj@xxxxxxxxx> Sent: Sunday, March 21, 2004 8:51 AM > Unfortunately I don't have access to ITU specs so I can't check what > is the suggested policy for hopCount. > Is hopCount a used field in LRQs? In my example GK1 was also a GnuGk > gatekeeper. What do I have to set up for it to include hopCount field > in LRQ requests? [ForwardHopCount=2] Why it is not sent always? > Do somebody know that other gatekeepers (like Cisco) fill/set this > field in LRQs or not? > If it is not strictly defined [in standard] we could run into some > pain situation, when the sending gatekeeper does not have hopCount > field and it's not possible set it up. > (I found hopcount setting in Cisco gatekeeper: > "Examples > > The following example shows a maximum of 10 hops through which an address resolution can be forwarded. > > Router(config)# call-router h323-annexg be20 > Router(config-annexg)# hopcount 10" > Should it be this the right setting?) > > Thanks in advance, > Thomas > > > Saturday, March 20, 2004, 4:54:33 PM, Zygmuntowicz wrote: > ZM> I think if the hopCount field is missing, the LRQ should not be forwarded, > ZM> so the original code is working well in this case. Any other opinions? > > ZM> ----- Original Message ----- > ZM> From: "Thomas" <thomasj@xxxxxxxxx> > ZM> Sent: Saturday, March 20, 2004 1:21 AM > > > >> The bug description was sent to the users list, however after looking > >> for the source codes I found that this is not a configuration issue > >> but a bug in code (most probably). > >> > >> Short description: > >> The ForwardHopCount option was not used in routing decision. > >> > >> Longer description: > >> > >> bool NeighborPolicy::OnRequest(LocationRequest & lrq_obj) > >> { > >> RasMsg *ras = lrq_obj.GetWrapper(); > >> List::iterator iter = find_if(m_neighbors.begin(), > >> m_neighbors.end(), bind2nd(mem_fun(&Neighbor::IsAcceptable), ras)); > >> Neighbor *requester = (iter != m_neighbors.end()) ? *iter : 0; > >> int hopCount = 0; > >> if (requester) > >> if (requester->ForwardLRQ() < 0) > >> return false; > >> else if (requester->ForwardLRQ() > 0) > >> hopCount = 1; > >> > >> H225_LocationRequest & lrq = (*ras)->m_recvRAS; > >> if > >> (lrq.HasOptionalField(H225_LocationRequest::e_hopCount)) { > >> hopCount = lrq.m_hopCount - 1; > >> if (hopCount) > >> lrq.m_hopCount = hopCount; > >> } > >> if (!hopCount) > >> return false; > >> > >> If I set ForwardLRQ=always, I had a good workaround. The default > >> ForwardLRQ's values is depends, which is not handled in previouse > >> code. So hopCount=0. > >> The LRQ request had no hopCount field, so the hopCount variable > >> remained 0, thus the OnRequest function returned with false. > >> > >> Here is a simple bugfix (I'm not sure if it is 100% correct) agains > >> anon. CVS (2_2): > >> cvs diff -u Neighbor.cxx > >> Index: Neighbor.cxx > >> =================================================================== > >> RCS file: /cvsroot/openh323gk/openh323gk/Neighbor.cxx,v > >> retrieving revision 1.19 > >> diff -u -r1.19 Neighbor.cxx > >> --- Neighbor.cxx 9 Mar 2004 11:36:42 -0000 1.19 > >> +++ Neighbor.cxx 19 Mar 2004 23:57:54 -0000 > >> @@ -853,6 +853,11 @@ > >> return false; > >> else if (requester->ForwardLRQ() > 0) > >> hopCount = 1; > >> + else { > >> + hopCount = > >> requester->GetDefaultHopCount() - 1; > >> + if (hopCount < 0) > >> + hopCount = 0; > >> + } > >> > >> H225_LocationRequest & lrq = (*ras)->m_recvRAS; > >> if > >> (lrq.HasOptionalField(H225_LocationRequest::e_hopCount)) { > >> > >> Kind regards, > >> Thomas > >> > >> Friday, March 19, 2004, 8:57:25 PM, Thomas wrote: > >> T> Hello, > >> > >> T> I have 3 GKs interconnected theirselves with neighboring. > >> T> GK1-GK2-GK3 > >> T> I would like to forward LRQs on GK2 coming from GK1 to GK3. I set up > >> T> routing but somehow it doesn't work. > >> T> 2004/03/19 20:17:27.289 5 job.cxx(186) JOB > >> T> Starting Job LRQ at Worker thread 9223 > >> T> 2004/03/19 20:17:27.289 1 RasSrv.cxx(306) RAS LRQ Received > >> T> 2004/03/19 20:17:27.289 2 Toolkit.cxx(291) > >> T> RewritePString: 111111 to 1212#1111 > >> T> 2004/03/19 20:17:27.289 4 gkauth.h(113) GkAuth default check ok > >> T> 2004/03/19 20:17:27.289 5 Routing.h(117) ROUTING > >> T> Checking policy Internal for the request LRQ 59 > >> T> 2004/03/19 20:17:27.289 5 Routing.h(117) ROUTING > >> T> Checking policy Neighbor for the request LRQ 59 > >> T> 2004/03/19 20:17:27.289 2 RasSrv.cxx(351) > >> T> LRJ|<gk1ip>|1212#111:dialedDigits|<gk1id>|requestDenied > >> > >> T> Call from an endpoint registered under GK2 goes normally to GK3 > >> T> through LRQ, so I don't think it's the problem. Also, I can call from > >> T> an endpoint registered to GK1 an endpoint registered under GK2. > >> > >> T> Configuration on GK2: > >> T> [RasSrv::LRQFeatures] > >> T> NeighborTimeout=2 > >> T> IncludeDestinationInfoInLCF=1 > >> T> CiscoGKCompatible=1 > >> T> ForwardHopCount=2 > >> T> AcceptForwardedLRQ=1 > >> T> ForwardResponse=1 > >> > >> T> [Neighbor::GK3] > >> T> Host=<gk3ip> > >> T> Dynamic=0 > >> T> SendPrefixes=1212# > >> T> AcceptForwardedLRQ=1 > >> > >> T> [Neighbor::GK1] > >> T> Host=<gk1ip> > >> T> Dynamic=0 > >> T> AcceptPrefixes=1212# > >> T> AcceptForwardedLRQ=1 > >> T> ForwardHopCount=2 > >> > >> T> [RoutingPolicy] > >> T> Default=internal,neighbor,parent > >> > >> T> Thanks in advance, > >> T> Thomas ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ List: Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549 Homepage: http://www.gnugk.org/