Date: Thu, 10 Feb 2000 16:16:27 +1100 From: peter.jeremy@ALCATEL.COM.AU To: FreeBSD-gnats-submit@freebsd.org Subject: bin/16625: Incorrect information in routed(8) error message Message-ID: <00Feb10.161627est.115226@border.alcanet.com.au>
next in thread | raw e-mail | index | archive | help
>Number: 16625
>Category: bin
>Synopsis: Incorrect information in routed(8) error message
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Feb 9 21:20:01 PST 2000
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00Feb10.161627est.115226>
