misc/187404: Add default route after static routes

Stavros Patiniotis stavros at staff.esc.net.au
Mon Mar 10 00:10:00 UTC 2014


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


More information about the freebsd-bugs mailing list