Bug #13740


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

Added by William Welliver about 3 years ago. Updated almost 3 years ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:
External Bug:


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 about 3 years ago

  • Gerrit CR set to 1430
Actions #2

Updated by William Welliver about 3 years 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 -interface

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 UG 1 0 UH 2 0 lo0 U 3 34 net0 U 1 0 net0 UG 1 0

Actions #3

Updated by Electric Monk almost 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 10c0779de9b4d8c4ebdb274e17730c49bc925f00

commit  10c0779de9b4d8c4ebdb274e17730c49bc925f00
Author: William Welliver <>
Date:   2021-06-01T02:20:35.000Z

    13740 net-routing-setup should support default gateway via link-local routes
    Reviewed by: Dan McDonald <>
    Approved by: Robert Mustacchi <>


Also available in: Atom PDF