From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 4 15:50:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF2001065734 for ; Wed, 4 Feb 2009 15:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C8E328FC19 for ; Wed, 4 Feb 2009 15:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n14Fo2e4090509 for ; Wed, 4 Feb 2009 15:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n14Fo2De090508; Wed, 4 Feb 2009 15:50:02 GMT (envelope-from gnats) Resent-Date: Wed, 4 Feb 2009 15:50:02 GMT Resent-Message-Id: <200902041550.n14Fo2De090508@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vivek Khera Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C32A106564A for ; Wed, 4 Feb 2009 15:41:08 +0000 (UTC) (envelope-from vivek@m1e.net) Received: from mmfe1.m1e.net (mmfe1.m1e.net [206.112.95.7]) by mx1.freebsd.org (Postfix) with ESMTP id 0E10D8FC16 for ; Wed, 4 Feb 2009 15:41:07 +0000 (UTC) (envelope-from vivek@m1e.net) Received: by mmfe1.m1e.net (Postfix, from userid 120) id E0E3C5084A; Wed, 4 Feb 2009 10:25:31 -0500 (EST) Message-Id: <20090204152531.E0E3C5084A@mmfe1.m1e.net> Date: Wed, 4 Feb 2009 10:25:31 -0500 (EST) From: Vivek Khera To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/131365: route add changes interpretation of network specification X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Vivek Khera List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 15:50:06 -0000 >Number: 131365 >Category: bin >Synopsis: route add changes interpretation of network specification >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 04 15:50:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Vivek Khera >Release: FreeBSD 7.1-RELEASE-p2 amd64 >Organization: >Environment: System: FreeBSD mmfe1.m1e.net 7.1-RELEASE-p2 FreeBSD 7.1-RELEASE-p2 #0: Fri Jan 16 23:44:29 EST 2009 vivek@mmfe1.m1e.net:/n/lorax1/usr7/obj.amd64/n/lorax1/usr7/src/sys/KCI64SMP amd64 >Description: In my /etc.rc.conf, I have a static route for my VPN connection to route the internal address to my VPN router: route_vpn1="-net 192.168 192.168.100.202" Up through FreeBSD 7.0-REL (including all 5.x and 6.x releases), this was interpreted by the route add command as 192.168.0.0/16. As of FreeBSD 7.1 it is treated as 192.168.0.0/24. The only way to see this is to use netstat -rn command, as netstat -r will show nothing different on a 7.0 vs a 7.1 machine. Also pinging an address in the 192.168.x.y (where x > 0) range will try to use the default route rather than the expected VPN route. The man page has not changed to reflect this new behavior, either. >How-To-Repeat: add a static route like this: route add -net 192.168 192.168.100.202 and view the routes with netstat -rn They will be different on 7.1 than any prior FreeBSD release. >Fix: the workaround is to explicitly specify the netmask: route add -net 192.168/16 192.168.100.202 At minimum, the man page needs to be updated to reflect this, and I would have expected an entry in UPDATING as I nearly lost access to this machine because of the loss of the route. I was lucky to have another local machine to access it via the LAN. >Release-Note: >Audit-Trail: >Unformatted: