Skip to content
Commit d6eac9bd authored by Daniel Wang's avatar Daniel Wang Committed by Zbigniew Jędrzejewski-Szmek
Browse files

DHCP: when adding static routes set scopes properly (#5982)

DHCP responses could include static routes, but unfortunately not an
option to tell what scope to use. So it's important that the client sets
it properly.

This mimics what the `ip route add` command does when adding a static
route without an explicit scope:

* If the destination IP is on the local host, use scope `host`
* Otherwise if the gateway IP is null (direct route), use scope `link`
* If anything else, use the current default `global`.

Fixes #5979.
parent 07755554
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment