sd-dhcp-server: also send DNS servers or friends on DHCPOFFER
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 11 May 2023 07:42:27 +0000 (16:42 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 13 May 2023 11:37:17 +0000 (12:37 +0100)
commit0c3ea0c2222df1b34c12ad5354dc5f835686fc5c
treefe6198255652c38d44531ee748a1269df7c36bf7
parentd5e6c4be91860c386170a26f5e43dd7bfe94ae77
sd-dhcp-server: also send DNS servers or friends on DHCPOFFER

From RFC 2131 section 4.3.1 (https://www.rfc-editor.org/rfc/rfc2131#section-4.3.1):
----
The server MUST return to the client:
- Parameters requested by the client, according to the following rules:
  -- IF the server has been explicitly configured with a default
     value for the parameter, the server MUST include that value
     in an appropriate option in the 'option' field,
----
The sentence is not only for ACK, but for all (positive) responses, that
is DHCPOFFER and DHCPACK.

Fixes #27471.
src/libsystemd-network/sd-dhcp-server.c