Compare commits
2 Commits
4d4ac92c92
...
bf9012bbf6
Author | SHA1 | Date |
---|---|---|
Serge | bf9012bbf6 | |
Tom Fitzhenry | a0fa3ef7ff |
|
@ -875,7 +875,9 @@ static int client_send_discover(sd_dhcp_client *client) {
|
||||||
address be assigned, and may include the ’IP address lease time’
|
address be assigned, and may include the ’IP address lease time’
|
||||||
option to suggest the lease time it would like.
|
option to suggest the lease time it would like.
|
||||||
*/
|
*/
|
||||||
if (client->last_addr != INADDR_ANY) {
|
/* RFC7844 section 3:
|
||||||
|
SHOULD NOT contain any other option. */
|
||||||
|
if (!client->anonymize && client->last_addr != INADDR_ANY) {
|
||||||
r = dhcp_option_append(&discover->dhcp, optlen, &optoffset, 0,
|
r = dhcp_option_append(&discover->dhcp, optlen, &optoffset, 0,
|
||||||
SD_DHCP_OPTION_REQUESTED_IP_ADDRESS,
|
SD_DHCP_OPTION_REQUESTED_IP_ADDRESS,
|
||||||
4, &client->last_addr);
|
4, &client->last_addr);
|
||||||
|
|
|
@ -284,7 +284,7 @@ int dhcp4_server_configure(Link *link) {
|
||||||
|
|
||||||
r = sd_dhcp_server_set_emit_router(link->dhcp_server, link->network->dhcp_server_emit_router);
|
r = sd_dhcp_server_set_emit_router(link->dhcp_server, link->network->dhcp_server_emit_router);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_warning_errno(link, r, "Failed to set router emission for DHCP server: %m");
|
return log_link_error_errno(link, r, "Failed to set router emission for DHCP server: %m");
|
||||||
|
|
||||||
if (link->network->dhcp_server_emit_timezone) {
|
if (link->network->dhcp_server_emit_timezone) {
|
||||||
_cleanup_free_ char *buffer = NULL;
|
_cleanup_free_ char *buffer = NULL;
|
||||||
|
@ -295,7 +295,7 @@ int dhcp4_server_configure(Link *link) {
|
||||||
else {
|
else {
|
||||||
r = get_timezone(&buffer);
|
r = get_timezone(&buffer);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_warning_errno(r, "Failed to determine timezone: %m");
|
return log_error_errno(r, "Failed to determine timezone: %m");
|
||||||
|
|
||||||
tz = buffer;
|
tz = buffer;
|
||||||
}
|
}
|
||||||
|
@ -316,7 +316,7 @@ int dhcp4_server_configure(Link *link) {
|
||||||
if (!sd_dhcp_server_is_running(link->dhcp_server)) {
|
if (!sd_dhcp_server_is_running(link->dhcp_server)) {
|
||||||
r = sd_dhcp_server_start(link->dhcp_server);
|
r = sd_dhcp_server_start(link->dhcp_server);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_warning_errno(link, r, "Could not start DHCPv4 server instance: %m");
|
return log_link_error_errno(link, r, "Could not start DHCPv4 server instance: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue