WIP: core/vlan: s/master/controller/

This commit is contained in:
Lubomir Rintel 2023-01-22 23:14:22 +01:00
parent 06777031b2
commit 812ac09260

View file

@ -610,24 +610,24 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
if (priv->parent) {
if (nm_utils_is_uuid(priv->parent)) {
/* If we have an NMSettingConnection:master with slave-type="vlan",
/* If we have an NMSettingConnection:controller with slave-type="vlan",
* then it must be the same UUID.
*/
if (s_con) {
const char *master = NULL, *slave_type = NULL;
const char *controller = NULL, *slave_type = NULL;
slave_type = nm_setting_connection_get_slave_type(s_con);
if (!g_strcmp0(slave_type, NM_SETTING_VLAN_SETTING_NAME))
master = nm_setting_connection_get_controller(s_con);
controller = nm_setting_connection_get_controller(s_con);
if (master && g_strcmp0(priv->parent, master) != 0) {
if (controller && g_strcmp0(priv->parent, controller) != 0) {
g_set_error(error,
NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_INVALID_PROPERTY,
_("'%s' value doesn't match '%s=%s'"),
priv->parent,
NM_SETTING_CONNECTION_MASTER,
master);
controller);
g_prefix_error(error,
"%s.%s: ",
NM_SETTING_VLAN_SETTING_NAME,
@ -911,8 +911,8 @@ nm_setting_vlan_class_init(NMSettingVlanClass *klass)
* interface. Flags include %NM_VLAN_FLAG_REORDER_HEADERS (reordering of
* output packet headers), %NM_VLAN_FLAG_GVRP (use of the GVRP protocol),
* and %NM_VLAN_FLAG_LOOSE_BINDING (loose binding of the interface to its
* master device's operating state). %NM_VLAN_FLAG_MVRP (use of the MVRP
* protocol).
* controller device's operating state). %NM_VLAN_FLAG_MVRP (use of the
* MVRP protocol).
*
* The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS,
* but it used to be 0. To preserve backward compatibility, the default-value