bin/90389: [patch] Remove debug printfs from routed

Gavin Atkinson gavin.atkinson at ury.york.ac.uk
Wed Dec 14 06:30:31 PST 2005


>Number:         90389
>Category:       bin
>Synopsis:       [patch] Remove debug printfs from routed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 14 14:30:03 GMT 2005
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-bugs mailing list