Browse code

clarifications on reasons for ininite loops introduced

Jiri Kuthan authored on 28/06/2003 12:28:28
Showing 1 changed files
... ...
@@ -331,6 +331,24 @@ warning: IP extract from warning activated to be more informational
331 331
 				    them.
332 332
 				</para>
333 333
 			    </listitem>
334
+				<listitem>
335
+				<para>
336
+					In your script expressions compare IP addresses without
337
+					enclosing them in quotes. Enclosing IP addresses in
338
+					quotes may cause additional reverse DNS lookups.
339
+					<example>
340
+						<title>IP Address Comparison</title>
341
+						<programlisting>
342
+# this expression takes no DNS lookup
343
+if (src_ip==192.168.2.15) {
344
+....
345
+# whereas this does
346
+if (src_ip=="192.168.2.15") {
347
+...
348
+						</programlisting>
349
+					</example>
350
+				</para>
351
+				</listitem>
334 352
 			</itemizedlist>
335 353
 		    </para>
336 354
 		</answer>
... ...
@@ -1349,7 +1367,10 @@ if (to me):
1349 1367
 			    In both cases, the reason is probably an error in
1350 1368
 			    request routing script which caused an infinite loop.
1351 1369
 			    You can easily verify whether this happens by
1352
-			    watching SIP traffic on loopback interface. A typical
1370
+			    watching SIP traffic on loopback interface. 
1371
+			</para>
1372
+			<para>
1373
+				A most comon
1353 1374
 			    reason for misrouting is a failure to match local
1354 1375
 			    domain correctly. If a server fails to recognize
1355 1376
 			    a request for itself, it will try to forward it
... ...
@@ -1359,9 +1380,38 @@ if (to me):
1359 1380
 			    value of max_forwards header field reaches zero
1360 1381
 			    or the request grows too big. Solutions is easy:
1361 1382
 			    make sure that domain matching is correctly
1362
-			    configured. See <xref linkend="domainmatching">
1383
+			    configured. In easy case, it is as simple as adding
1384
+				an alias configuration option. See <xref linkend="domainmatching">
1363 1385
 			    for more information how to get it right.
1364 1386
 			</para>
1387
+			<para>
1388
+				Other favorite misconfiguration is forgetting to
1389
+				rewrite a URI before a request is forwarded.
1390
+			</para>
1391
+			<para>
1392
+				Also, the failure not to include loose routing in your
1393
+				scripts may lead to infinite loops. Make sure that you
1394
+				include the following script fragment immediately after
1395
+				request sanity checks:
1396
+				<example>
1397
+					<title>
1398
+						Processing of Loose Routes Must be Present
1399
+					</title>
1400
+<programlisting>
1401
+    if (len_gt( max_len )) {
1402
+        sl_send_reply("513", "Message too big");
1403
+        break;
1404
+    };
1405
+
1406
+    # DON'T FORGET THE FOLLOWING LINES
1407
+	    if (loose_route()) {
1408
+        t_relay();
1409
+        break;
1410
+    };
1411
+</programlisting>
1412
+				</example>
1413
+
1414
+			</para>
1365 1415
 		    </answer>		    
1366 1416
 		</qandaentry>
1367 1417
 		<qandaentry>