mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-23 02:40:06 +01:00
team: fix wrong assertion in device-team
The assertion that priv->teamd_pid is set does not hold. For example, if no teamd binary can be found, "Stage 1 of 5 (Device Prepare)" fails with "Activation (nm-team) to start teamd: not found". This causes the device state to become "failed" and later "disconnected", which in turn calls teamd_stop without a valid teamd_pid set. Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
f767e05f4a
commit
d11f41a8a0
1 changed files with 7 additions and 3 deletions
|
|
@ -473,9 +473,13 @@ teamd_start (NMDevice *dev, NMSettingTeam *s_team, NMDeviceTeamPrivate *priv)
|
|||
static void
|
||||
teamd_stop (NMDevice *dev, NMDeviceTeamPrivate *priv)
|
||||
{
|
||||
g_return_if_fail (priv->teamd_pid > 0);
|
||||
nm_log_info (LOGD_TEAM, "Deactivation (%s) stopping teamd...",
|
||||
nm_device_get_ip_iface (dev));
|
||||
if (priv->teamd_pid > 0) {
|
||||
nm_log_info (LOGD_TEAM, "Deactivation (%s) stopping teamd...",
|
||||
nm_device_get_ip_iface (dev));
|
||||
} else {
|
||||
nm_log_dbg (LOGD_TEAM, "Deactivation (%s) stopping teamd (not started)...",
|
||||
nm_device_get_ip_iface (dev));
|
||||
}
|
||||
teamd_cleanup (dev);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue