Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2014 00:01:57 GMT
From:      Stavros Patiniotis <stavros@staff.esc.net.au>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/187404: Add default route after static routes
Message-ID:  <201403100001.s2A01vdH009779@cgiserv.freebsd.org>
Resent-Message-ID: <201403100010.s2A0A0Cb019011@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403100001.s2A01vdH009779>