diff options
author | Thomas Haller <thaller@redhat.com> | 2015-10-08 10:02:48 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-10-23 11:23:46 +0200 |
commit | 21674d5bfbd7858f2a19037bfbde4f3eea8beaa6 (patch) | |
tree | a1450a440e6cc0e2c34727edb5a53057c4b32bb6 /libnm-util | |
parent | 7a14f19e0937bc7b8546dfa361f92319d5d8a351 (diff) |
libnm: treat missing NMSettingVlan:flags property as old default value
We changed the default value of MSettingVlan:flags from 0 to
1 (NM_VLAN_FLAG_REORDER_HEADERS). That means, that old libnm
clients will not serialize 0 (their default).
This change broke the D-Bus API. The D-Bus API allows to omit a value
when meaning the default value. That means, we cannot change the
default value (in the D-Bus API!) without breaking previous assumptions.
A newer libnm version should treat a missing flags argument as the
old default value and thus preserve the original default value (in the
D-Bus API).
This has the downside that for the future we will continue to treat a missing
value as the old default value (0), and in order to get the new default
value (1), the client must explicitly set the flags.
We also must restore the original default value in libnm-glib.
libnm-glib does not support _nm_setting_class_override_property()
and thus it must keep thinking that the default value for the GObject
property continues to be 0. Otherwise, it would not serialize a 1, which
a new libnm would now interpret as 0.
https://bugzilla.redhat.com/show_bug.cgi?id=1250225
Fixes: 687b6515980c08cdbb9734bd112a594166c4d6dd
Diffstat (limited to 'libnm-util')
-rw-r--r-- | libnm-util/nm-setting-vlan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-util/nm-setting-vlan.c b/libnm-util/nm-setting-vlan.c index c3d4bb58f..52676d47f 100644 --- a/libnm-util/nm-setting-vlan.c +++ b/libnm-util/nm-setting-vlan.c @@ -805,7 +805,7 @@ nm_setting_vlan_class_init (NMSettingVlanClass *setting_class) g_object_class_install_property (object_class, PROP_FLAGS, g_param_spec_uint (NM_SETTING_VLAN_FLAGS, "", "", - 0, G_MAXUINT32, NM_VLAN_FLAG_REORDER_HEADERS, + 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | |