From ga9@945testbox.york.ac.uk  Wed Dec 14 14:20:40 2005
Return-Path: <ga9@945testbox.york.ac.uk>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DD12E16A420;
	Wed, 14 Dec 2005 14:20:40 +0000 (GMT)
	(envelope-from ga9@945testbox.york.ac.uk)
Received: from mail-gw0.york.ac.uk (mail-gw0.york.ac.uk [144.32.128.245])
	by mx1.FreeBSD.org (Postfix) with ESMTP id DB82B43D46;
	Wed, 14 Dec 2005 14:20:39 +0000 (GMT)
	(envelope-from ga9@945testbox.york.ac.uk)
Received: from 945testbox.york.ac.uk (945testbox.york.ac.uk [144.32.227.28])
	by mail-gw0.york.ac.uk (8.12.10/8.12.10) with ESMTP id jBEEKUCN023555;
	Wed, 14 Dec 2005 14:20:30 GMT
Received: from 945testbox.york.ac.uk (localhost [127.0.0.1])
	by 945testbox.york.ac.uk (8.13.4/8.13.4) with ESMTP id jBEEKXKr007376;
	Wed, 14 Dec 2005 14:20:33 GMT
	(envelope-from ga9@945testbox.york.ac.uk)
Received: (from root@localhost)
	by 945testbox.york.ac.uk (8.13.4/8.13.4/Submit) id jBEEKWi9007375;
	Wed, 14 Dec 2005 14:20:32 GMT
	(envelope-from ga9)
Message-Id: <200512141420.jBEEKWi9007375@945testbox.york.ac.uk>
Date: Wed, 14 Dec 2005 14:20:32 GMT
From: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
Reply-To: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc: phk@freebsd.org, gavin.atkinson@ury.york.ac.uk
Subject: [patch] Remove debug printfs from routed
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         90389
>Category:       bin
>Synopsis:       [patch] Remove debug printfs from routed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 14 14:30:03 GMT 2005
>Closed-Date:    Wed Dec 28 10:02:10 GMT 2005
>Last-Modified:  Wed Dec 28 10:02:10 GMT 2005
>Originator:     Gavin Atkinson
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD 945testbox.york.ac.uk 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Mon Dec 12 18:04:02 GMT 2005 root@945testbox.york.ac.uk:/usr/obj/usr/src/sys/GENERIC i386

>Description:
	When starting routed, it prints the following:

wiggum# /sbin/routed -q
loop 100007f
wiggum#

As far as I can tell, the "loop" line serves no purpose, and initially concerned me as
I initially thought something had gone wrong (due to ther terseness). I suspect the code
was left in accidentally as part of the changes in revision 1.14 of src/sbin/routed/if.c
by phk.  I propose we remove them, or if it's decided they should stay, make them a little
more verbose.  The attached patch removes them.

>How-To-Repeat:
	/sbin/routed -q

>Fix:

--- routed-rmdebug.diff begins here ---
Index: src/sbin/routed/if.c
===================================================================
RCS file: /usr/cvs/src/sbin/routed/if.c,v
retrieving revision 1.15
diff -u -p -r1.15 if.c
--- src/sbin/routed/if.c	31 May 2005 20:28:48 -0000	1.15
+++ src/sbin/routed/if.c	14 Dec 2005 14:13:01 -0000
@@ -805,12 +805,8 @@ ifinit(void)
 
 		if (ifs.int_if_flags & IFF_LOOPBACK) {
 			ifs.int_state |= IS_NO_RIP | IS_NO_RDISC;
-			if (ifs.int_addr == htonl(INADDR_LOOPBACK)) {
-				printf("loop %x\n", ifs.int_addr);
+			if (ifs.int_addr == htonl(INADDR_LOOPBACK))
 				ifs.int_state |= IS_PASSIVE;
-			} else {
-				printf("alias %x\n", ifs.int_addr);
-			}
 			
 			ifs.int_dstaddr = ifs.int_addr;
 			ifs.int_mask = HOST_MASK;
--- routed-rmdebug.diff ends here ---


>Release-Note:
>Audit-Trail:
Adding to audit trail from misfiled PR bin/90389:

Date: Tue, 20 Dec 2005 13:21:41 +0100
From: "Poul-Henning Kamp" <phk@phk.freebsd.dk>
 
> As far as I can tell, the "loop" line serves no purpose, and initially
> concerned me as I initially thought something had gone wrong (due to
> ther terseness). I suspect the code was left in accidentally as part of
> the changes in revision 1.14 of src/sbin/routed/if.c by phk.  I propose
> we remove them, or if it's decided they should stay, make them a little
> more verbose.  The attached patch removes them.
 
 That's a long time ago indeed.
 
 I belive the problem was that routed checked the wrong bit to find
 loopback interfaces and therefore classified some other interfaces
 (point2point ?) as uninteresting.
 
 I don't think the printf serves any particular cause any more.
 
 -- 
 Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
 phk@FreeBSD.ORG         | TCP/IP since RFC 956
 FreeBSD committer       | BSD since 4.3-tahoe    
 Never attribute to malice what can adequately be explained by incompetence.

State-Changed-From-To: open->patched 
State-Changed-By: maxim 
State-Changed-When: Tue Dec 20 18:19:17 UTC 2005 
State-Changed-Why:  
Fixed in HEAD.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90389 
State-Changed-From-To: patched->closed 
State-Changed-By: maxim 
State-Changed-When: Wed Dec 28 10:01:53 UTC 2005 
State-Changed-Why:  
MFCed to RELENG_6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90389 
>Unformatted:
