libnm-core: fail verify() for NMSettingVlan for invalid vlan id
authorThomas Haller <thaller@redhat.com>
Fri, 22 Jan 2016 10:23:02 +0000 (11:23 +0100)
committerThomas Haller <thaller@redhat.com>
Fri, 22 Jan 2016 11:02:39 +0000 (12:02 +0100)
commit8715d61437060cacc68c156b1c8ed7bbce4b0a78
tree505bfa7f1458e9362cdaab386dc2890550c96818
parentbd74a9348f30121f96072bc2ec28babf1405b676
libnm-core: fail verify() for NMSettingVlan for invalid vlan id

Point in case:

    # ip link add link dummy0 name dummy0.vlan type vlan id 4095
    RTNETLINK answers: Numerical result out of range

This potentially causes existing (invalid) connections to disappear
as they now fail verification.

Instead of adjusting the range of the GObject property
NM_SETTING_VLAN_ID, reject it during vlan. This is a bit more
forgiving to an older client that isn't aware of this new restriction,
so he can first set the value without raising a critical warning.
libnm-core/nm-setting-vlan.c
libnm-util/nm-setting-vlan.c
src/NetworkManagerUtils.c
src/tests/test-general-with-expect.c