diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-08-30 15:22:04 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-08-31 17:44:13 +0200 |
commit | 4f5059306be98748d2bede9cb5f011e889c81805 (patch) | |
tree | c0035d2ed15877fa69f3c7b234bcd6f20e88a29f /libnm-core/nm-setting-team.c | |
parent | 9740a5903522cc2ccbab335be5480caa669b34de (diff) |
Revert "libnm-core/team: normalize invalid config to NULL"
It's better to fail the validation of any invalid configuration
instead of silently ignoring it.
This reverts commit 476810c29016d569ac3885542a6c91e7af8a7f6d.
(cherry picked from commit 39ad134b0ca1918084b2b1fc5856cc0b7a6becfc)
Diffstat (limited to 'libnm-core/nm-setting-team.c')
-rw-r--r-- | libnm-core/nm-setting-team.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c index a559e0db78..df89694f66 100644 --- a/libnm-core/nm-setting-team.c +++ b/libnm-core/nm-setting-team.c @@ -94,19 +94,11 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) "%s.%s: ", NM_SETTING_TEAM_SETTING_NAME, NM_SETTING_TEAM_CONFIG); - /* for backward compatibility, we accept invalid json and normalize it */ - if (!priv->config[0]) { - /* be more forgiving to "" and let it verify() as valid because - * at least anaconda used to write such configs */ - return NM_SETTING_VERIFY_NORMALIZABLE; - } - return NM_SETTING_VERIFY_NORMALIZABLE_ERROR; + /* We treat an empty string as no config for compatibility. */ + return *priv->config ? FALSE : NM_SETTING_VERIFY_NORMALIZABLE; } } - /* NOTE: normalizable/normalizable-errors must appear at the end with decreasing severity. - * Take care to properly order statements with priv->config above. */ - return TRUE; } |