Browse code

Fixed Via and MF in traceroute modus.

Nils Ohlmeier authored on 22/05/2002 19:15:09
Showing 1 changed files
... ...
@@ -424,19 +424,20 @@ void shoot(char *buff, long address, int lport, int rport, int maxforw, int trac
424 424
 		nretries=3*(nameend-namebeg)+3;
425 425
 		create_msg(buff, REQ_REG, lport);
426 426
 		retryAfter = 5000;
427
-	}
428
-	if (trace){
427
+	}else if (trace){
429 428
 		if (maxforw)
430 429
 			nretries=maxforw;
431 430
 		else
432 431
 			nretries=255;
433 432
 		namebeg=1;
434 433
 		create_msg(buff, REQ_OPT, lport);
435
-	}
436
-	if(maxforw!=-1)
437
-		set_maxforw(buff, maxforw);
438
-	if(vbool)
439 434
 		add_via(buff, lport);
435
+	} else {
436
+		if(maxforw!=-1)
437
+			set_maxforw(buff, maxforw);
438
+		if(vbool)
439
+			add_via(buff, lport);
440
+	}
440 441
 
441 442
 	/* if we got a redirect this loop ensures sending to the 
442 443
 	   redirected server*/
... ...
@@ -606,6 +607,7 @@ void shoot(char *buff, long address, int lport, int rport, int maxforw, int trac
606 607
 #endif
607 608
 						namebeg++;
608 609
 						create_msg(buff, REQ_OPT, lport);
610
+						add_via(buff, lport);
609 611
 						continue;
610 612
 					}
611 613
 					else {