From e65173fc9737a0023e23799a330e852404605548 Mon Sep 17 00:00:00 2001 From: Razvan Crainea Date: Tue, 3 Sep 2024 12:17:16 +0300 Subject: [PATCH] topology_hiding: do not mark the contacts parts as HDR_CONTACT_T This ensures that when a fixed contact is restored from a shm lump, it does not overlap to contact parts, as topology hiding builds them. Many thanks to David Trihy from Genesys for reporting and helping us troubleshoot. --- modules/tm/t_msgbuilder.h | 2 +- modules/topology_hiding/topo_hiding_logic.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/tm/t_msgbuilder.h b/modules/tm/t_msgbuilder.h index f2d7833457d..0842833cbd5 100644 --- a/modules/tm/t_msgbuilder.h +++ b/modules/tm/t_msgbuilder.h @@ -160,7 +160,7 @@ static inline int fix_fake_req_headers(struct sip_msg *req) for (c = ((contact_body_t *)hdr->parsed)->contacts; c; c = c->next) { /* search for the lump */ for (ld = req->add_rm; ld; ld = ld->next) { - if (ld->op != LUMP_DEL) + if (ld->op != LUMP_DEL && ld->op != LUMP_NOP) continue; for (la = ld->after; la; la = la->after) { /* LM_DBG("matching contact lump op=%d type=%d offset=%d" diff --git a/modules/topology_hiding/topo_hiding_logic.c b/modules/topology_hiding/topo_hiding_logic.c index bb9c1b1e3d5..b8829618ec1 100644 --- a/modules/topology_hiding/topo_hiding_logic.c +++ b/modules/topology_hiding/topo_hiding_logic.c @@ -420,7 +420,7 @@ static int topo_dlg_replace_contact(struct sip_msg* msg, struct dlg_cell* dlg, i goto error; } - if ((lump = insert_new_lump_after(lump, prefix, ct->len, HDR_CONTACT_T)) == 0) { + if ((lump = insert_new_lump_after(lump, prefix, ct->len, 0)) == 0) { LM_ERR("failed inserting '%.*s'\n", ct->len, prefix); goto error; } @@ -597,19 +597,19 @@ static int topo_dlg_replace_contact(struct sip_msg* msg, struct dlg_cell* dlg, i goto error; } - if ((lump = insert_new_lump_after(lump,prefix,prefix_len,HDR_CONTACT_T)) == 0) { + if ((lump = insert_new_lump_after(lump,prefix,prefix_len,0)) == 0) { LM_ERR("failed inserting '