]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-dhcp4.c
networkd: use VRFs routing table for DHCP routes
authorAndreas Rammhold <andreas@rammhold.de>
Thu, 7 Sep 2017 09:08:39 +0000 (11:08 +0200)
committerAndreas Rammhold <andreas@rammhold.de>
Wed, 27 Sep 2017 18:02:15 +0000 (20:02 +0200)
commitfc1ba79d65f1835effebd2e3fd532631f74a0536
tree37f99b357bc55b05480930162da8790c4a788ff8
parent9ecf63a457a357fa6c3d7801bbfc7c14800ae87d
networkd: use VRFs routing table for DHCP routes

When an interface has been enslaved to a VRF the received routes should
be added to the VRFs RT instead of the main table.

This change modifies the default behaviour of routes in the case where a
network belongs to an VRF.  When the user does not configure a
`DHCP.RouteTable` in a `systemd.network` file and the interface belongs
to a VRF, the VRFs routing table is used instead of RT_TABLE_MAIN.

When the user has configured a custom routing table for DHCP the VRFs
table is ignored and the users preference takes precedence.
src/network/networkd-dhcp4.c
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h