ifcfg-rh: change the handling of REORDER_HDR flag
authorBeniamino Galvani <bgalvani@redhat.com>
Fri, 26 Feb 2016 14:29:19 +0000 (15:29 +0100)
committerBeniamino Galvani <bgalvani@redhat.com>
Mon, 29 Feb 2016 17:11:17 +0000 (18:11 +0100)
commit2e5e7285a875f84377da4e5035795286a6f13c9b
tree04dc30ef43bf8eeb1c27af5e676fe55e48818480
parenteb80f690981fe849c3bfc2477f1d3350b6e35f6d
ifcfg-rh: change the handling of REORDER_HDR flag

On NM 1.0 connections were created by default without the REORDER_HDR
flag, but then due to a bug in platform code (fixed in [1]), the
kernel interface always had the flag set.

Now that the setting is honored, users upgrading to the new version of
NM will see a change from the previous behavior, since interfaces will
not have REORDER_HDR and this will certainly break functionality.

The only solution here seems to be to ignore the REORDER_HDR variable
in ifcfg files (since it never had any effect) and introduce a new
NO_REORDER_HDR option for the VLAN_FLAGS variable which allows to turn
the flag off. The consequence is that the flag will be set for all old
connections.

This change introduces an incompatibility with initscripts, however is
necessary to avoid breaking user functionality upon upgrade.
Connections created through NetworkManager will still be parsed
correctly by initscripts (since we always write the REORDER_HDR
variable).

[1] db62fc9d72fa ("platform: fix adding VLAN flags")

https://bugzilla.gnome.org/show_bug.cgi?id=762626
libnm-core/nm-setting-vlan.c
src/settings/plugins/ifcfg-rh/reader.c
src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am
src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-flags-2
src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-interface
src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-reorder-hdr-1
src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-vlan-reorder-hdr-2 [new file with mode: 0644]
src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
src/settings/plugins/ifcfg-rh/writer.c