libnm/vlan: default to vlan.flags=REORDER_HDR for new connections (rh #1250225)
authorJiří Klimeš <jklimes@redhat.com>
Fri, 28 Aug 2015 14:45:42 +0000 (16:45 +0200)
committerJiří Klimeš <jklimes@redhat.com>
Wed, 7 Oct 2015 11:45:30 +0000 (13:45 +0200)
commit687b6515980c08cdbb9734bd112a594166c4d6dd
tree090a249054b802de82b85f9fef4ed771297d8577
parentc41be469ab107ea2b4813bf28a1618572b78aa6a
libnm/vlan: default to vlan.flags=REORDER_HDR for new connections (rh #1250225)

The kernel defaults REORDER_HDR to 1 when creating a new VLAN, but
NetworkManager's VLAN flags property defaulted to 0. Thus REORDER_HDR was not
set for NM-created VLANs with default values.

We want to match the kernel default, so we change the default value for the
vlan.flags property. However, we do not want to change the flags for existing
connections if the property is missing in connection files. Thus we have to
update plugins for that. We also make sure that vlan.flags is always written
by 'keyfile' when the value is default. That way new connections have flags
property explicitly written and it will be loaded as expected.

https://bugzilla.redhat.com/show_bug.cgi?id=1250225
libnm-core/nm-keyfile-reader.c
libnm-core/nm-keyfile-writer.c
libnm-core/nm-setting-vlan.c
libnm-util/nm-setting-vlan.c
src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
src/settings/plugins/keyfile/tests/keyfiles/Makefile.am
src/settings/plugins/keyfile/tests/keyfiles/Test_Missing_Vlan_Flags [new file with mode: 0644]
src/settings/plugins/keyfile/tests/test-keyfile.c