diff options
author | Susant Sahani <ssahani@vmware.com> | 2019-06-03 12:31:13 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-06 22:50:29 +0900 |
commit | 7da377ef16a2112a673247b39041a180b07e973a (patch) | |
tree | 65d9e287940a1456fd18796b522035245ddffea7 /src/network/networkd-dhcp4.c | |
parent | f0c53dfe3ce7304e888690f3f72b8561ae9d3e18 (diff) | |
download | systemd-7da377ef16a2112a673247b39041a180b07e973a.tar.gz systemd-7da377ef16a2112a673247b39041a180b07e973a.tar.bz2 systemd-7da377ef16a2112a673247b39041a180b07e973a.zip |
networkd: add support to keep configuration
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r-- | src/network/networkd-dhcp4.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 4ed020ea8e..88a72e39a9 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -464,7 +464,7 @@ static int dhcp_lease_renew(sd_dhcp_client *client, Link *link) { if (r < 0) return log_link_warning_errno(link, r, "DHCP error: no netmask: %m"); - if (!link->network->dhcp_critical) { + if (!FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) { r = sd_dhcp_lease_get_lifetime(link->dhcp_lease, &lifetime); if (r < 0) return log_link_warning_errno(link, r, "DHCP error: no lifetime: %m"); @@ -581,7 +581,7 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) { } } - if (!link->network->dhcp_critical) { + if (!FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) { r = sd_dhcp_lease_get_lifetime(link->dhcp_lease, &lifetime); if (r < 0) return log_link_warning_errno(link, r, "DHCP error: no lifetime: %m"); @@ -649,7 +649,7 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) { return log_link_warning_errno(link, r, "Could not acquire IPv4 link-local address: %m"); } - if (link->network->dhcp_critical) { + if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) { log_link_notice(link, "DHCPv4 connection considered critical, ignoring request to reconfigure it."); return 0; } @@ -669,7 +669,7 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) { case SD_DHCP_CLIENT_EVENT_EXPIRED: case SD_DHCP_CLIENT_EVENT_IP_CHANGE: - if (link->network->dhcp_critical) { + if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) { log_link_notice(link, "DHCPv4 connection considered critical, ignoring request to reconfigure it."); return 0; } |