]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-dhcp6-client: Properly handle DHCPv6 client restart after resume
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 23 Sep 2015 11:10:26 +0000 (14:10 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 23 Sep 2015 12:24:04 +0000 (15:24 +0300)
commite66040417b52be98d41ba1230f25dea65147e8ee
tree093afb610d552b4f0f810083113bb8dae022d29b
parent44598572da523f66872f593be7139b9a0f97deee
sd-dhcp6-client: Properly handle DHCPv6 client restart after resume

Whenever a Router Advertisement is received, dhcp6_configure() will be
called. A Router Advertisment can also instruct DHCPv6 to start acquiring
IPv6 addresses in manged mode, if it previously was handling only other
information. As an Router Advertisment is also received after the DHCPv6
client has resumed from a suspend, fix the function not to assume DHCPv6
is currently running, but instead try to restart it. Handle
sd_dhcp6_start() returning -EALREADY indicating that the DHCPv6 client was
already running.

Collect all client unrefs in one place to unclutter the error handling.

Fixes https://github.com/systemd/systemd/issues/963
src/network/networkd-dhcp6.c