Project

General

Profile

Actions

Bug #13740

closed

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

Added by William Welliver 9 months ago. Updated 8 months ago.

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

100%

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 9 months ago

  • Gerrit CR set to 1430
Actions #2

Updated by William Welliver 9 months 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 #3

Updated by Electric Monk 8 months ago

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

git commit 10c0779de9b4d8c4ebdb274e17730c49bc925f00

commit  10c0779de9b4d8c4ebdb274e17730c49bc925f00
Author: William Welliver <william@welliver.org>
Date:   2021-06-01T02:20:35.000Z

    13740 net-routing-setup should support default gateway via link-local routes
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF