From jeremyp@gsmx07.alcatel.com.au  Wed Feb  9 21:16:13 2000
Return-Path: <jeremyp@gsmx07.alcatel.com.au>
Received: from alcanet.com.au (mail.alcanet.com.au [203.62.196.10])
	by builder.freebsd.org (Postfix) with ESMTP id 7B5ED43A8
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  9 Feb 2000 21:16:11 -0800 (PST)
Received: by border.alcanet.com.au id <115226>; Thu, 10 Feb 2000 16:16:27 +1100
Message-Id: <00Feb10.161627est.115226@border.alcanet.com.au>
Date: Thu, 10 Feb 2000 16:16:27 +1100
From: peter.jeremy@ALCATEL.COM.AU
Sender: jeremyp@gsmx07.alcatel.com.au
To: FreeBSD-gnats-submit@freebsd.org
Subject: Incorrect information in routed(8) error message
X-Send-Pr-Version: 3.2

>Number:         16625
>Category:       bin
>Synopsis:       Incorrect information in routed(8) error message
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    phk
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb  9 21:20:01 PST 2000
>Closed-Date:    Wed Jun 27 18:50:56 PDT 2001
>Last-Modified:  Wed Jun 27 18:51:16 PDT 2001
>Originator:     Peter Jeremy
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
Alcatel Australia Limited
>Environment:

	Recent 3.4-STABLE

>Description:

	When routed(8) receives a RIP message from a non-standard port,
	it syslogs a message like "discard RIP response from unknown port
	51982".  Unfortunately, the port number is byte-swapped.  Also,
	the lack of source host information makes locating the offending
	host more difficult.

>How-To-Repeat:

	Run routed.  Generate RIP response messages to the host with a
	source port other than 520.

>Fix:

	The following correctly byte-swaps the source port before printing
	it and also reports the source IP address.

Index: input.c
===================================================================
RCS file: /gsmx07/CVSROOT/src/sbin/routed/input.c,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 input.c
--- input.c	1999/08/29 15:15:26	1.4.2.1
+++ input.c	2000/02/10 05:06:45
@@ -450,7 +450,8 @@
 		if (from->sin_port != ntohs(RIP_PORT)) {
 			msglim(&bad_router, FROM_NADDR,
 			       "    discard RIP response from unknown port"
-			       " %d", from->sin_port);
+			       " %d on host %s", ntohs(from->sin_port),
+				naddr_ntoa(FROM_NADDR));
 			return;
 		}
 

>Release-Note:
>Audit-Trail:

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Vernon Schryver <vjs@calcite.rhyolite.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/16625: Incorrect information in routed(8) error message
Date: Mon, 14 Aug 2000 19:09:01 +0200

 Hi Vernon,
 
 Recently, you addressed a byte-swapping problem in routed.  I have a PR
 here which suggests that there may be another one to deal with, in the
 error message printed when discarding RIP responses from unknown ports.
 
 Could you check out this PR and comment?
 
 	http://www.freebsd.org/cgi/query-pr.cgi?pr=16625
 
 Thanks,
 Sheldon.
 
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Wed Jun 27 18:50:56 PDT 2001 
State-Changed-Why:  
phk recently committed the patch in this PR, but forgot to close it. 


Responsible-Changed-From-To: freebsd-bugs->phk 
Responsible-Changed-By: dd 
Responsible-Changed-When: Wed Jun 27 18:50:56 PDT 2001 
Responsible-Changed-Why:  
JFYI 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=16625 
>Unformatted:
