Project

General

Profile

Actions

Bug #13740

open

net-routing-setup should support default gateway via link-local routes

Added by William Welliver 15 days ago. Updated 15 days ago.

Status:
New
Priority:
Normal
Category:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Currently, net-routing-setup creates a default route (if present) before creating any static routes. Some installations, such as at OVH, specify a default route on a subnet different from that of the interface the default route is present on. A link-local static route must be added so that the default route can be created.

I propose to split processing of static routes into two groups: those with the "-interface" argument, which will be added before the default gateway and those without, which will be added in the usual place for static routes.

It would seem that always creating link-local routes first should not cause problems, as they should always be directly accessible without a next-hop.

Actions #1

Updated by Electric Monk 15 days ago

  • Gerrit CR set to 1430
Actions #2

Updated by William Welliver 15 days ago

Testing notes:

A variation of the proposed fix first appeared in SmartOS and has been running there since last summer.

I've also tested a series of static routes, both link-local and not, in varying orders and combinations. Specifically also tested routes (default and next-hop) that depend on the presence of a link local route and these all displayed expected behavior.

Example (purposely out of order to prove the ordering works):

  1. cat /etc/inet/static_routes
    192.168.24.0/24 192.168.23.4
    192.168.23.0/24 -interface 192.168.19.173

Following restart, we get both the link local and next hop routes:

  1. netstat -rn

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 192.168.19.1 UG 1 0
127.0.0.1 127.0.0.1 UH 2 0 lo0
192.168.19.0 192.168.19.173 U 3 34 net0
192.168.23.0 192.168.19.173 U 1 0 net0
192.168.24.0 192.168.23.4 UG 1 0

Actions

Also available in: Atom PDF