Commit 57b77b10 authored by Dan Williams's avatar Dan Williams

core: fix parent/master confusion in some argument names

It's the parent, not the master, that we care about here.
parent 51edc6ae
......@@ -1028,8 +1028,8 @@ nm_utils_is_uuid (const char *str)
}
char *
nm_utils_new_vlan_name (const char *master_iface, guint32 vlan_id)
nm_utils_new_vlan_name (const char *parent_iface, guint32 vlan_id)
{
return g_strdup_printf ("%s.%d", master_iface, vlan_id);
return g_strdup_printf ("%s.%d", parent_iface, vlan_id);
}
......@@ -100,6 +100,6 @@ void nm_utils_complete_generic (NMConnection *connection,
gboolean nm_utils_is_uuid (const char *str);
char *nm_utils_new_vlan_name (const char *master_iface, guint32 vlan_id);
char *nm_utils_new_vlan_name (const char *parent_iface, guint32 vlan_id);
#endif /* NETWORK_MANAGER_UTILS_H */
......@@ -1788,7 +1788,7 @@ err_out_delete_vlan_with_new_name:
* nm_system_add_vlan_iface:
* @connection: the #NMConnection that describes the VLAN interface
* @iface: the interface name of the new VLAN interface
* @master_ifindex: the interface index of the new VLAN interface's master
* @parent_ifindex: the interface index of the new VLAN interface's master
* interface
*
* Add a VLAN device named @iface and specified in @connection.
......@@ -1798,7 +1798,7 @@ err_out_delete_vlan_with_new_name:
gboolean
nm_system_add_vlan_iface (NMConnection *connection,
const char *iface,
int master_ifindex)
int parent_ifindex)
{
NMSettingVlan *s_vlan;
int ret = -1;
......@@ -1808,7 +1808,7 @@ nm_system_add_vlan_iface (NMConnection *connection,
guint32 vlan_flags = 0;
guint32 num, i, from, to;
g_return_val_if_fail (master_ifindex >= 0, FALSE);
g_return_val_if_fail (parent_ifindex >= 0, FALSE);
nlh = nm_netlink_get_default_handle ();
g_return_val_if_fail (nlh != NULL, FALSE);
......@@ -1835,12 +1835,12 @@ nm_system_add_vlan_iface (NMConnection *connection,
* There is no linbl3, try ioctl.
*/
ret = -1;
if (nm_system_iface_compat_add_vlan (connection, iface, master_ifindex))
if (nm_system_iface_compat_add_vlan (connection, iface, parent_ifindex))
ret = 0;
goto out;
}
rtnl_link_set_link (new_link, master_ifindex);
rtnl_link_set_link (new_link, parent_ifindex);
rtnl_link_set_name (new_link, iface);
rtnl_link_vlan_set_id (new_link, vlan_id);
......
......@@ -109,7 +109,7 @@ gboolean nm_system_get_iface_vlan_info (int ifindex,
gboolean nm_system_add_vlan_iface (NMConnection *connection,
const char *iface,
int master_ifindex);
int parent_ifindex);
gboolean nm_system_del_vlan_iface (const char *iface);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment