]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp6-client: allow setting send-release when client is running
authorFernando Fernandez Mancera <ffmancera@riseup.net>
Wed, 7 Feb 2024 10:07:38 +0000 (11:07 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 7 Feb 2024 20:24:20 +0000 (05:24 +0900)
The send-release option only affects to the client when STOPPING. There
is no reason to do not allow this option to be set while the client is
running.

An user might want to delay the decision of sending a RELEASE message to
a later stage where the client is already running.

src/libsystemd-network/sd-dhcp6-client.c

index db4e0f9c5919ffa99ea43beb978e0969b7e37096..5a26102e232b0fe4567fd906c19cd2ea5f8b714a 100644 (file)
@@ -511,7 +511,6 @@ int sd_dhcp6_client_set_rapid_commit(sd_dhcp6_client *client, int enable) {
 
 int sd_dhcp6_client_set_send_release(sd_dhcp6_client *client, int enable) {
         assert_return(client, -EINVAL);
-        assert_return(!sd_dhcp6_client_is_running(client), -EBUSY);
 
         client->send_release = enable;
         return 0;