From owner-freebsd-bugs@FreeBSD.ORG Mon Mar 10 00:10:00 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB8BE53A for ; Mon, 10 Mar 2014 00:10:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 987C67B3 for ; Mon, 10 Mar 2014 00:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2A0A0c6019012 for ; Mon, 10 Mar 2014 00:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2A0A0Cb019011; Mon, 10 Mar 2014 00:10:00 GMT (envelope-from gnats) Resent-Date: Mon, 10 Mar 2014 00:10:00 GMT Resent-Message-Id: <201403100010.s2A0A0Cb019011@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, Stavros Patiniotis Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08EB64DC for ; Mon, 10 Mar 2014 00:01:59 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA77B77F for ; Mon, 10 Mar 2014 00:01:58 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2A01v1X009780 for ; Mon, 10 Mar 2014 00:01:57 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2A01vdH009779; Mon, 10 Mar 2014 00:01:57 GMT (envelope-from nobody) Message-Id: <201403100001.s2A01vdH009779@cgiserv.freebsd.org> Date: Mon, 10 Mar 2014 00:01:57 GMT From: Stavros Patiniotis To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/187404: Add default route after static routes X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2014 00:10:00 -0000 >Number: 187404 >Category: misc >Synopsis: Add default route after static routes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 10 00:10:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Stavros Patiniotis >Release: 9.1-RELEASE amd64 >Organization: EscapeNet >Environment: FreeBSD template-fbsd9.1-64bit.esc.net.au 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Tue May 28 03:28:39 CST 2013 root@template-fbsd9.1-64bit.esc.net.au:/usr/obj/usr/src/sys/XENHVM amd64 >Description: The issue we are experiencing is that the default route is added before static routes. We have a situation whereby the default route relies on a static route eg defaultrouter="$private_ip" ifconfig_xn0="inet $public_ip netmask 255.255.255.255 -tso" static_routes="xn0" route_xn0="-host $private_ip -iface xn0" >How-To-Repeat: >Fix: See attached patch file. Also suggestion to add 'man rc.conf' Add in the "static_routes" section, Static routes are added before any default route (see defaultrouter). Patch attached with submission follows: --- /etc/rc.d/routing.old 2014-03-10 09:54:53.000000000 +1030 +++ /etc/rc.d/routing 2014-03-10 09:18:58.000000000 +1030 @@ -122,7 +122,8 @@ [Nn][Oo] | '') ;; *) - static_routes="default ${static_routes}" + static_routes="${static_routes} default" route_default="default ${defaultrouter}" ;; esac >Release-Note: >Audit-Trail: >Unformatted: