Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PR #5431/490899f8 backport][stable-6] nmcli: two fixes needed to mak…
…e wifi.wake-on-wlan settings work properly (#6051) nmcli: two fixes needed to make wifi.wake-on-wlan settings work properly (#5431) * nmcli: Convert current value of wifi.wake-on-wlan before comparing The new value of wifi.wake-on-wlan is specified as an integer, but in the nmcli output it's specified as a hex string followed by a textual description of it. Therefore, to determine properly whether it's being changed we need to pull the hex string out of the current value, convert it into an integer, and finally convert the integer back to a string so that we can compare it to the new specified value. Without this change, whenever wifi.wake-on-wlan is specified in the module arguments the module will think the value is being changed even when it isn't. * nmcli: Handle wifi options correctly when connection type not specified When an nmcli task does not specify the connection type and the module ask nmcli for it, the module needs to convert nmcli's `802-11-wireless` to `wifi`, the term for this connection type used by the module. * nmcli: Correctly detect values changed to the integer 0 If the user specifies a value of 0 (without quotes) in a task, we should interpret that as an actual value, not empty, when comparing the new value to the old one. Otherwise we incorrectly conclude that there was no change. * Changelog fragment for #5431 (cherry picked from commit 490899f) Co-authored-by: Jonathan Kamens <[email protected]>
- Loading branch information