mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
device: allow resetting the devip state via nm_device_devip_set_state()
There is no reason to disallow resetting the state.
This commit is contained in:
parent
a5f125f8cb
commit
607a9544cb
|
@ -89,7 +89,10 @@ nm_device_devip_set_state(NMDevice *self,
|
|||
nm_assert(NM_IS_DEVICE(self));
|
||||
nm_assert_addr_family_or_unspec(addr_family);
|
||||
nm_assert(!l3cd || NM_IS_L3_CONFIG_DATA(l3cd));
|
||||
nm_assert(NM_IN_SET(ip_state, NM_DEVICE_IP_STATE_PENDING, NM_DEVICE_IP_STATE_READY));
|
||||
nm_assert(NM_IN_SET(ip_state,
|
||||
NM_DEVICE_IP_STATE_NONE,
|
||||
NM_DEVICE_IP_STATE_PENDING,
|
||||
NM_DEVICE_IP_STATE_READY));
|
||||
|
||||
nm_device_devip_set_state_full(self, addr_family, ip_state, l3cd, NM_DEVICE_STATE_REASON_NONE);
|
||||
}
|
||||
|
|
|
@ -9958,6 +9958,7 @@ nm_device_devip_set_state_full(NMDevice *self,
|
|||
|
||||
nm_assert_addr_family_or_unspec(addr_family);
|
||||
nm_assert(NM_IN_SET(ip_state,
|
||||
NM_DEVICE_IP_STATE_NONE,
|
||||
NM_DEVICE_IP_STATE_PENDING,
|
||||
NM_DEVICE_IP_STATE_READY,
|
||||
NM_DEVICE_IP_STATE_FAILED));
|
||||
|
@ -9965,7 +9966,7 @@ nm_device_devip_set_state_full(NMDevice *self,
|
|||
|
||||
nm_assert((ip_state != NM_DEVICE_IP_STATE_FAILED)
|
||||
== (failed_reason == NM_DEVICE_STATE_REASON_NONE));
|
||||
nm_assert((ip_state != NM_DEVICE_IP_STATE_FAILED) || !l3cd);
|
||||
nm_assert(NM_IN_SET(ip_state, NM_DEVICE_IP_STATE_PENDING, NM_DEVICE_IP_STATE_READY) || !l3cd);
|
||||
|
||||
p = _dev_ipdev_data(self, addr_family);
|
||||
|
||||
|
|
Loading…
Reference in a new issue