From e94d76382c1fef2b4c1e012fdf9f5c55de5f0e91 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 7 Feb 2020 21:35:44 +0100 Subject: [PATCH] team: ignore bus name appearance if we can't determine process id If the GetConnectionUnixProcessID() call fails, the process that registered on the bus has died and we should ignore the name appearance event. --- src/devices/team/nm-device-team.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c index fb9c9c6963..a76a877589 100644 --- a/src/devices/team/nm-device-team.c +++ b/src/devices/team/nm-device-team.c @@ -380,11 +380,14 @@ teamd_dbus_appeared (GDBusConnection *connection, if (pid != priv->teamd_pid) teamd_cleanup (self, FALSE); } else { - _LOGW (LOGD_TEAM, "failed to determine D-Bus name owner"); - /* If we can't determine the bus name owner, don't kill our - * teamd instance. Hopefully another existing teamd just died and - * our instance will be able to grab the bus name. - */ + /* The process that registered on the bus died. If it's + * the teamd instance we just started, ignore the event + * as we already detect the failure through the process + * watch. If it's a previous instance that got killed, + * also ignore that as our new instance will register + * again. */ + _LOGD (LOGD_TEAM, "failed to determine D-Bus name owner, ignoring"); + return; } }