]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-link.c
networkd: Allow DHCP servers to be re-configured on carrier gain 6116/head
authorRichard Maw <richard.maw@codethink.co.uk>
Fri, 9 Jun 2017 15:18:25 +0000 (16:18 +0100)
committerRichard Maw <richard.maw@codethink.co.uk>
Mon, 12 Jun 2017 15:54:42 +0000 (16:54 +0100)
commit45a9eac9a0c85c0c76b46388a530edd335ae44af
tree17549add403c49048202acb0fcd2eddb22c0a91f
parentc1835a427fddac41dcc780cf733b53e01721e8f2
networkd: Allow DHCP servers to be re-configured on carrier gain

In normal operation this would trigger an assertion
when a DHCP server is configured every time the link goes up.

This change makes sd_dhcp_server_configure_pool idempotent
and stops the DHCP server when the link loses carrier.

In addition to this stopping the assertion being triggered,
this has the useful side-effect of allowing the link to be taken down
and then brought back up as a way to have it use DNS from an "upstream"
interface that got its DNS configuration via DHCP
after the downstream link was configured.
src/libsystemd-network/sd-dhcp-server.c
src/libsystemd-network/test-dhcp-server.c
src/network/networkd-link.c