]> git.ipfire.org Git - thirdparty/systemd.git/commit
network/dhcp4: create prefix route and route to gateway in the specified table with...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 26 Jan 2025 20:17:44 +0000 (05:17 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 26 Jan 2025 23:38:14 +0000 (08:38 +0900)
commit863293dbd3116d5e1e157f7a8563d46565a285eb
tree2940a2180d470d2d351ef4d27c22bb9bea31a0d9
parentc7adb64e12574912cc0f0e096091941c348dacce
network/dhcp4: create prefix route and route to gateway in the specified table with Gateway=_dhcp4

Previously, the following setting
====
[Route]
Gateway=_dhcp4
Table=100
====
only configured the route in the specified table. But it was mostly
useless. This makes prefix route and route to the gateway are also
configured in the specified table.

Before:
====
$ ip route show table 100
default via 192.168.0.1 dev eth0 proto dhcp metric 1024
====

After:
====
$ ip route show table 100
default via 192.168.0.1 dev eth0 proto dhcp metric 1024
192.168.0.0/24 dev eth0 proto dhcp src 192.168.0.100 metric 1024
192.168.0.1 dev eth0 proto dhcp scope link src 192.168.0.100 metric 1024
====
src/network/networkd-dhcp4.c