Date: Mon, 3 Sep 2001 19:51:38 +0200 (CEST) From: Christoph Weber-Fahr <wefa@nxcon.nexgo.lab.arcor.de> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/30289: route behaves strange Message-ID: <200109031751.f83HpcF71005@nxcon.nexgo.lab.arcor.de>
next in thread | raw e-mail | index | archive | help
>Number: 30289
>Category: bin
>Synopsis: the route command evaluates arguments in an undocumented and wrong way
>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: Mon Sep 03 11:00:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Christoph Weber-Fahr
>Release: FreeBSD 4.3-RELEASE i386
>Organization:
Arcor AG
>Environment:
System: FreeBSD nxcon.nexgo.lab.arcor.de 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Thu Jul 26 19:41:55 CEST 2001 root@nxcon.nexgo.lab.arcor.de:/dat/cvsup/src/sys/compile/NXCON i386
>Description:
a wrong but not uncommon command line leads to very strange results:
nxcon# 18:16 [img]route add 192.168.78.0 255.255.255.0 192.168.77.1
add net 192.168.78.0: gateway 255.255.255.0
nxcon# 18:16 [img]route -n get 192.168.78.4
route to: 192.168.78.4
destination: 192.168.76.0
mask: 192.168.77.1
gateway: 255.255.255.0
interface: xl0
flags: <UP,GATEWAY,DONE,STATIC,PRCLONING>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
0 0 0 0 0 0 1500 0
The problem here is obvious - but in other circumstances this could
produce an 'apparently working system' (ping works to some target host)
but which is completely wrong.
according to the man page route should
- consider the address a host address
- ignore the third parameter
in my opinion, route should instead
- recognize the illegal parameter
- abort with an error message
Unfortunately it does neither.
(Of course it also could recognize and correctly evaluate the
statement as intended, but that's a matter of design and not
the issue here.)
>How-To-Repeat:
see above
>Fix:
>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?200109031751.f83HpcF71005>
