From owner-freebsd-bugs Mon Sep 3 11: 0:29 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4663C37B40F for ; Mon, 3 Sep 2001 11:00:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f83I03P20440; Mon, 3 Sep 2001 11:00:03 -0700 (PDT) (envelope-from gnats) Received: from nxcon.nexgo.lab.arcor.de (nxcon.nexgo.lab.arcor.de [145.253.194.34]) by hub.freebsd.org (Postfix) with ESMTP id 8703837B405 for ; Mon, 3 Sep 2001 10:51:41 -0700 (PDT) Received: (from wefa@localhost) by nxcon.nexgo.lab.arcor.de (8.11.3/8.9.3) id f83HpcF71005; Mon, 3 Sep 2001 19:51:38 +0200 (CEST) (envelope-from wefa) Message-Id: <200109031751.f83HpcF71005@nxcon.nexgo.lab.arcor.de> Date: Mon, 3 Sep 2001 19:51:38 +0200 (CEST) From: Christoph Weber-Fahr Reply-To: christoph.weber-fahr@arcor.net To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/30289: route behaves strange Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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: 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