]> git.ipfire.org Git - thirdparty/systemd.git/commit
dhcp: don't stop receiving packets when the link goes down
authorBeniamino Galvani <bgalvani@redhat.com>
Sun, 17 Feb 2019 18:06:34 +0000 (19:06 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 19 Feb 2019 11:19:36 +0000 (20:19 +0900)
commit22a3fd2da9db2a61ff1dffc55f9e07f175fcca3e
tree30eb267e36a4e02f27259f7101ee4aced328967e
parent825ace96b1076ac367d2962e3979f62954145812
dhcp: don't stop receiving packets when the link goes down

When the link goes down, DHCP client_receive_message*() functions return an
error and the related I/O source is removed from the main loop. With the
current implementation of systemd-networkd this doesn't matter because the DHCP
client is always stopped on carrier down and restarted on carrier up. However
it seems wrong to have the DHCP client crippled (because no packet can be
received anymore) once the link goes temporarily down.

Change the receive functions to ignore a ENETDOWN event so that the client will
be able to receive packets again after the link comes back.
src/libsystemd-network/sd-dhcp-client.c
src/libsystemd-network/sd-dhcp6-client.c