From b336a275708cdf570b0a82e9aa8b198a9707eddf Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Tue, 19 Mar 2024 16:01:14 +0100 Subject: [PATCH] Check locator kind when matching interface address Signed-off-by: Erik Boasson --- src/core/ddsi/src/ddsi_endpoint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/ddsi/src/ddsi_endpoint.c b/src/core/ddsi/src/ddsi_endpoint.c index 574c52adfa..cfd607f6c2 100644 --- a/src/core/ddsi/src/ddsi_endpoint.c +++ b/src/core/ddsi/src/ddsi_endpoint.c @@ -233,7 +233,8 @@ static bool nwpart_includes_ssm_enabled_interfaces (const struct ddsi_domaingv * for (const struct ddsi_networkpartition_address *a = np->uc_addresses; a; a = a->next) { for (int i = 0; i < gv->n_interfaces; i++) - if (memcmp (a->loc.address, gv->interfaces[i].loc.address, sizeof (a->loc.address)) == 0 && + if (a->loc.kind == gv->interfaces[i].loc.kind && + memcmp (a->loc.address, gv->interfaces[i].loc.address, sizeof (a->loc.address)) == 0 && (gv->interfaces[i].allow_multicast & DDSI_AMC_SSM)) return true; }