]> git.ipfire.org Git - thirdparty/systemd.git/commit - man/systemd.network.xml
DHCP: when adding static routes set scopes properly (#5982)
authorDaniel Wang <wonderfly@users.noreply.github.com>
Sat, 20 May 2017 11:05:18 +0000 (04:05 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 20 May 2017 11:05:18 +0000 (07:05 -0400)
commitd6eac9bd06066c8d041449538a9cdee0fd928835
treeafce00e83b746edcfbac672a29a7ef6bb4271b08
parent07755554abcb58a136be90fd30393feca8165442
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.
man/systemd.network.xml
src/network/networkd-dhcp4.c