diff options
author | Thomas Haller <thaller@redhat.com> | 2021-06-25 10:50:39 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-06-25 11:26:34 +0200 |
commit | b425793d90a7e02420e7f2b7b6f3c1abd8e393c4 (patch) | |
tree | bb9c4a0795251437ce0029f31ffe18e886c7fccd | |
parent | b5de7b2e48471434687df4d7146a8de7230f4b47 (diff) | |
download | NetworkManager-b425793d90a7e02420e7f2b7b6f3c1abd8e393c4.tar.gz |
ifcfg: always write ethernet.s390-options even without subchannels
For the umpteenth time: it is not ifcfg-rh writers decision to decide
what are valid configurations and only persist settings based on
some other settings.
If s390-options would only be allowed together with subchannels, then
this is alone nm_connection_verify()'s task to ensure.
Reproduce with
$ nmcli connection add type ethernet autoconnect no con-name zz ethernet.s390-options bridge_role=primary
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1935842
Fixes: 16bccfd672e7 ('core: handle s390 options more cleanly')
(cherry picked from commit d391f20730be67fb0a38a15b57fcd00cbc02053b)
-rw-r--r-- | src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c index c29e483b21..82516a6692 100644 --- a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c +++ b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c @@ -1132,7 +1132,7 @@ write_wired_setting_impl(NMSettingWired *s_wired, shvarFile *ifcfg, gboolean is_ svSetValueStr(ifcfg, "CTCPROT", nm_setting_wired_get_s390_option_by_key(s_wired, "ctcprot")); num_opts = nm_setting_wired_get_num_s390_options(s_wired); - if (s390_subchannels && num_opts) { + if (num_opts > 0) { nm_auto_free_gstring GString *tmp = NULL; for (i = 0; i < num_opts; i++) { |