mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 13:20:08 +01:00
This solves a bug exposed by the following cmds: $ nmcli c add type bond ifname bond0 con-name bond0 $ nmcli c modify bond0 +bond.options miimon=100 $ nmcli -f bond.options c show bond0 bond.options: mode=balance-rr Here we just added the option 'miimon=100', but it doesn't get saved in because nm_settings_connection_set_connection() which is responsible for actually updating the connection compares the new connection with old one and if and only if the 2 are different the update is carried out. The bug is triggered because when comparing, if default values are taken into account, then having 'miimon=100' or not having it it's essentially the same for compare(). While this doesn't cause a bond to have a wrong setting when activated it's wrong from a user experience point of view and thus must be fixed. When this patch is applied, the above commands will give the following results: $ nmcli c add type bond ifname bond0 con-name bond0 $ nmcli c modify bond0 +bond.options miimon=100 $ nmcli -f bond.options c show bond0 bond.options: mode=balance-rr,miimon=100 Fix unit tests and also add a new case covering this bug. https://bugzilla.redhat.com/show_bug.cgi?id=1806549 |
||
|---|---|---|
| .. | ||
| certs | ||
| meson.build | ||
| nm-core-tests-enum-types.c.template | ||
| nm-core-tests-enum-types.h.template | ||
| test-compare.c | ||
| test-crypto.c | ||
| test-general-enums.h | ||
| test-general.c | ||
| test-keyfile.c | ||
| test-secrets.c | ||
| test-setting.c | ||
| test-settings-defaults.c | ||