From 23850d4f8b0b6514d0a73d6832101dd219a4769c Mon Sep 17 00:00:00 2001 From: karl anderson Date: Thu, 24 Jul 2014 16:43:01 -0700 Subject: [PATCH] range the while loop, just in case --- kamailio/nat-traversal-role.cfg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kamailio/nat-traversal-role.cfg b/kamailio/nat-traversal-role.cfg index 0a25b8c..da71273 100644 --- a/kamailio/nat-traversal-role.cfg +++ b/kamailio/nat-traversal-role.cfg @@ -11,7 +11,11 @@ route[NAT_TEST_AND_CORRECT] { if (is_present_hf("Record-Route")) { $var(i) = $rr_count; - while($var(i) > 0) { + ## We witnessed this loop execute more than + ## 500 times, probably do to inability to + ## allocate rr_count or the parser. Either + ## way ensure the while loop is not unbound'd + while($var(i) > 0 && $var(i) < 30) { $var(i) = $var(i) - 1; $var(rr) = $(hdr(Record-Route)[$var(i)]); if (!is_myself("$(var(rr){nameaddr.uri})")) {