Module: kamailio
Branch: 5.7
Commit: 30776c97b97f0b6836b313af3f4d385fd6492073
URL:
https://github.com/kamailio/kamailio/commit/30776c97b97f0b6836b313af3f4d385…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Date: 2024-09-18T14:27:30Z
tm: add mandatory Max-Forwards header to local AC
(cherry picked from commit 3a34b468ad93904c507bd0fc7ef592b25321807f)
---
Modified: src/modules/tm/t_msgbuilder.c
---
Diff:
https://github.com/kamailio/kamailio/commit/30776c97b97f0b6836b313af3f4d385…
Patch:
https://github.com/kamailio/kamailio/commit/30776c97b97f0b6836b313af3f4d385…
---
diff --git a/src/modules/tm/t_msgbuilder.c b/src/modules/tm/t_msgbuilder.c
index 22289830df9..6ff3d8d61d5 100644
--- a/src/modules/tm/t_msgbuilder.c
+++ b/src/modules/tm/t_msgbuilder.c
@@ -1246,7 +1246,8 @@ char *build_dlg_ack(struct sip_msg *rpl, struct cell *Trans,
/* headers */
*len += Trans->from_hdr.len + Trans->callid_hdr.len + to->len
- + Trans->cseq_hdr_n.len + 1 + ACK_LEN + CRLF_LEN;
+ + Trans->cseq_hdr_n.len + 1 + ACK_LEN + +MAXFWD_HEADER_LEN
+ + CRLF_LEN;
/* copy'n'paste Route headers */
@@ -1291,6 +1292,8 @@ char *build_dlg_ack(struct sip_msg *rpl, struct cell *Trans,
append_str(p, Trans->callid_hdr.s, Trans->callid_hdr.len);
append_str(p, to->s, to->len);
+ append_str(p, MAXFWD_HEADER, MAXFWD_HEADER_LEN);
+
append_str(p, Trans->cseq_hdr_n.s, Trans->cseq_hdr_n.len);
append_str(p, " ", 1);
append_str(p, ACK, ACK_LEN);