summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-02-07 21:35:44 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2020-02-10 17:52:38 +0100
commit1d0e576971028ca9c883d1fea35fa0b22a644c70 (patch)
tree3e0e8c7c29f399d4d1dbf46e005f07e61cc39b83
parentdf6129d93a8445c649126cebffac3cb1192de771 (diff)
downloadNetworkManager-1d0e576971028ca9c883d1fea35fa0b22a644c70.tar.gz
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.
-rw-r--r--src/devices/team/nm-device-team.c13
1 files 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;
}
}