From bz@zabbadoz.net Mon Jul 4 14:08:34 2005 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 39FCA16A41C for ; Mon, 4 Jul 2005 14:08:34 +0000 (GMT) (envelope-from bz@zabbadoz.net) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD64E43D5D for ; Mon, 4 Jul 2005 14:08:33 +0000 (GMT) (envelope-from bz@zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 35D311FFACB for ; Mon, 4 Jul 2005 16:08:33 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id E16C01FF9AF; Mon, 4 Jul 2005 16:08:30 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id A13CA157B9; Mon, 4 Jul 2005 14:08:18 +0000 (UTC) Message-Id: <20050704140818.A13CA157B9@mail.int.zabbadoz.net> Date: Mon, 4 Jul 2005 14:08:18 +0000 (UTC) From: "Bjoern A. Zeeb" Reply-To: "Bjoern A. Zeeb" To: FreeBSD-gnats-submit@freebsd.org Cc: "Bjoern A. Zeeb" Subject: route change does not parse classfull network as given in netstat X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 82975 >Category: bin >Synopsis: route change does not parse classfull network as given in netstat >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-net >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 04 14:10:16 GMT 2005 >Closed-Date: >Last-Modified: Fri Jan 30 23:15:13 UTC 2009 >Originator: Bjoern A. Zeeb >Release: FreeBSD 6.0-CURRENT amd64 >Organization: Zabbadoz.NeT >Environment: >Description: route change of a classfull network might get parsed wrong. With netstat output of a classfull network (192.168.1.0/24) looks like this 192.168.1 192.168.64.31 UGS 0 0 em0 but route cannot correctly parse that (if not -net is given) which could lead to other bad effects. >How-To-Repeat: foo# netstat -rn -f inet | grep 192.168.1 192.168.1 192.168.64.31 UGS 0 0 em0 foo# netstat -rn -f inet | grep default default 192.168.64.1 UGS 0 27 em0 foo# route change 192.168.1 127.0.0.1 change host 192.168.1: gateway 127.0.0.1 got message of size 124 on Mon Jul 4 13:54:43 2005 RTM_CHANGE: Change Metrics or flags: len 124, pid: 55458, seq 1, errno 0, flags: locks: inits: sockaddrs: 192.168.0.1 127.0.0.1 ^^^^^^^^^^^^^ foo# netstat -rn -f inet | grep 192.168.1 192.168.1 192.168.64.31 UGS 0 0 em0 foo# netstat -rn -f inet | grep default default 127.0.0.1 UGS 0 27 lo0 There was no error returned that the given (host) route could not be parsed correctly or found in table. Route monitor returned 192.168.0.1 instead of 196.168.1.0 (what one might expect if there is no error). The change of default route is another problem (see PR 82974). >Fix: For consitency we should either be able to parse classfull routes given (without -net) and treat them like prefixes (like -net was given and with correct addresses). Alternatively return an error like ''ENOPARSE''. >Release-Note: >Audit-Trail: Responsible-Changed-From-To: freebsd-bugs->bz Responsible-Changed-By: bms Responsible-Changed-When: Mon Mar 5 12:48:05 UTC 2007 Responsible-Changed-Why: submitter is now a committer http://www.freebsd.org/cgi/query-pr.cgi?pr=82975 Responsible-Changed-From-To: bz->freebsd-bugs Responsible-Changed-By: bz Responsible-Changed-When: Mon Mar 5 12:50:57 UTC 2007 Responsible-Changed-Why: I was a committer when gnn asked me to file the PR. Assigning the the PR to me will not help anyone to get this fixed. I will not open Pandora's box touching that code. http://www.freebsd.org/cgi/query-pr.cgi?pr=82975 Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: brucec Responsible-Changed-When: Fri Jan 30 23:14:45 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=82975 >Unformatted: