Subject: bin/11330: confusing/wrong messages from rarpd
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: netbsd-bugs
Date: 10/29/2000 03:53:19
>Number:         11330
>Category:       bin
>Synopsis:       confusing/wrong messages from rarpd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 29 03:53:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Thilo Manske
>Release:        1.5BETA
>Organization:
Dies ist Thilos Unix Signature! Viel Spass damit.
>Environment:
	
System: NetBSD WintelKiller.HEH.Uni-Oldenburg.de 1.5_BETA NetBSD 1.5_BETA (WintelKiller) #260: Sun Oct 22 01:25:43 MEST 2000 thilo@WintelKiller.HEH.Uni-Oldenburg.de:/usr/src/sys/arch/i386/compile/WintelKiller i386


>Description:
	when you have rarpd runngin with debug output or syslogging you
will see something like this:

Oct 29 12:02:53 Seti rarpd[185]: received packet on epic0
Oct 29 12:02:53 Seti rarpd[185]: Stimpy.T asked; 08:00:20:18:f4:5f replied

Since rarp works the other way around (Something asks with its hardware
adress and the server answeres with an internet adress) it should better be:

Oct 29 12:02:53 Seti rarpd[185]: 08:00:20:18:f4:5f asked; Stimpy.T replied

>How-To-Repeat:
	run rarpd with logging (-l) or in debug-mode (-d) and watch the
	syslog/output
>Fix:
	change the order:

--- rarpd.c.old	Wed Oct 18 12:32:24 2000
+++ rarpd.c	Sun Oct 29 12:43:10 2000
@@ -941,11 +941,11 @@
 	len = sizeof(*ep) + sizeof(*ap);
 #endif
 
-	debug("%s asked; %s replied", hp->h_name,
-			    ether_ntoa((struct ether_addr *)ar_tha(ap)));
+	debug("%s asked; %s replied",
+		ether_ntoa((struct ether_addr *)ar_tha(ap)),hp->h_name);
 	if (lflag)
-		syslog(LOG_INFO, "%s asked; %s replied", hp->h_name, 
-		    ether_ntoa((struct ether_addr *)ar_tha(ap)));
+		syslog(LOG_INFO, "%s asked; %s replied",
+			ether_ntoa((struct ether_addr *)ar_tha(ap)),hp->h_name);
 	n = write(ii->ii_fd, (char *) ep, len);
 	if (n != len) {
 		rarperr(NONFATAL, "write: only %d of %d bytes written", n, len);
>Release-Note:
>Audit-Trail:
>Unformatted: