diff options
| author | Michael Biebl <biebl@debian.org> | 2016-03-01 16:55:22 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-03-01 16:55:22 +0100 |
| commit | c2de0d98ba39e0a1a970d066fd19be786092f376 (patch) | |
| tree | 3838363c06a6019db6cf1f882ea34ebded63c38b /libnm-util/nm-setting-vlan.c | |
| parent | 494f296a3baab08522617b24b1f126d8f9a17502 (diff) | |
Imported Upstream version 1.1.91 upstream/1.1.91
Diffstat (limited to 'libnm-util/nm-setting-vlan.c')
| -rw-r--r-- | libnm-util/nm-setting-vlan.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libnm-util/nm-setting-vlan.c b/libnm-util/nm-setting-vlan.c index 310a7da8..32ad9394 100644 --- a/libnm-util/nm-setting-vlan.c +++ b/libnm-util/nm-setting-vlan.c @@ -19,7 +19,7 @@ * Copyright 2011 - 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include <stdlib.h> #include <string.h> @@ -593,6 +593,16 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) return FALSE; } + if (priv->id >= 4095) { + g_set_error (error, + NM_SETTING_VLAN_ERROR, + NM_SETTING_VLAN_ERROR_INVALID_PROPERTY, + _("the vlan id must be in range 0-4094 but is %u"), + priv->id); + g_prefix_error (error, "%s.%s: ", NM_SETTING_VLAN_SETTING_NAME, NM_SETTING_VLAN_ID); + return FALSE; + } + /* If interface_name is specified, it must be a valid interface name. We * don't check that it matches parent and/or id, because we allow * renaming vlans to arbitrary names. |