mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 20:30:08 +01:00
dhcp: map "static" DHCP state for dhcpcd to bound
A user might configure /etc/dhcpcd.conf to contain static fallback addresses. In that case, the dhcpcd plugin reports the state as "static". Let's treat that the same way as bound. Note that this is not an officially supported or endorsed way of configuring fallback addresses in NetworkManager. Rather, when using DHCP plugins, the user can hack the system and make unsupported modifications in /etc/dhcpcd.conf or /etc/dhcp. This change only makes it a bit easier to do it. See-also: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/579#note_922758 https://bugzilla.gnome.org/show_bug.cgi?id=768362 Based-on-patch-by: gordonb3 <gordon@bosvangennip.nl>
This commit is contained in:
parent
c34e36bb8d
commit
aef9b95aaa
1 changed files with 2 additions and 1 deletions
|
|
@ -363,7 +363,8 @@ state_to_string(NMDhcpState state)
|
|||
static NMDhcpState
|
||||
reason_to_state(NMDhcpClient *self, const char *iface, const char *reason)
|
||||
{
|
||||
if (g_ascii_strcasecmp(reason, "bound") == 0 || g_ascii_strcasecmp(reason, "bound6") == 0)
|
||||
if (g_ascii_strcasecmp(reason, "bound") == 0 || g_ascii_strcasecmp(reason, "bound6") == 0
|
||||
|| g_ascii_strcasecmp(reason, "static") == 0)
|
||||
return NM_DHCP_STATE_BOUND;
|
||||
else if (g_ascii_strcasecmp(reason, "renew") == 0 || g_ascii_strcasecmp(reason, "renew6") == 0
|
||||
|| g_ascii_strcasecmp(reason, "reboot") == 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue