Browse Source

range the while loop, just in case

3.17
karl anderson 12 years ago
parent
commit
23850d4f8b
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      kamailio/nat-traversal-role.cfg

+ 5
- 1
kamailio/nat-traversal-role.cfg View File

@ -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})")) {


Loading…
Cancel
Save