mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-30 03:30:27 +01:00
device: add 'master_ifindex' field to NMDevice
https://bugzilla.redhat.com/show_bug.cgi?id=1870691 Signed-off-by: Antonio Cardace <acardace@redhat.com>
This commit is contained in:
parent
d2d74f99a9
commit
84dc705159
1 changed files with 5 additions and 0 deletions
|
|
@ -642,6 +642,7 @@ typedef struct _NMDevicePrivate {
|
|||
/* master interface for bridge/bond/team slave */
|
||||
NMDevice *master;
|
||||
gulong master_ready_id;
|
||||
int master_ifindex;
|
||||
|
||||
/* slave management */
|
||||
CList slaves; /* list of SlaveInfo */
|
||||
|
|
@ -5116,6 +5117,8 @@ device_recheck_slave_status(NMDevice *self, const NMPlatformLink *plink)
|
|||
return;
|
||||
}
|
||||
|
||||
priv->master_ifindex = plink->master;
|
||||
|
||||
if (priv->master) {
|
||||
if (plink->master > 0 && plink->master == nm_device_get_ifindex(priv->master)) {
|
||||
/* call add-slave again. We expect @self already to be added to
|
||||
|
|
@ -6197,6 +6200,8 @@ nm_device_unrealize(NMDevice *self, gboolean remove_resources, GError **error)
|
|||
if (nm_clear_g_free(&priv->ip_iface_))
|
||||
_notify(self, PROP_IP_IFACE);
|
||||
|
||||
priv->master_ifindex = 0;
|
||||
|
||||
_set_mtu(self, 0);
|
||||
|
||||
if (priv->driver_version) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue