From 8e60fe7df9fa2ceaa4636495a9b75d495dc336e9 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 17 Jun 2019 11:17:04 +0200 Subject: Don't disconnect on remote exit/2 with old incarnation as recipient --- erts/emulator/beam/dist.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c index 9fddac8980..26352e5534 100644 --- a/erts/emulator/beam/dist.c +++ b/erts/emulator/beam/dist.c @@ -1668,9 +1668,17 @@ int erts_net_message(Port *prt, token = tuple[4]; reason = tuple[5]; } - if (is_not_pid(from) || is_not_internal_pid(to)) { + if (is_not_pid(from)) { goto invalid_message; } + if (is_not_internal_pid(to)) { + if (is_external_pid(to)) { + DistEntry *dep = external_pid_dist_entry(to); + if (dep == erts_this_dist_entry) + break; /* Old incarnation of this node... */ + } + goto invalid_message; + } rp = erts_pid2proc(NULL, 0, to, rp_locks); if (rp) { (void) erts_send_exit_signal(NULL, -- cgit v1.2.3