Skip to content

Commit

Permalink
tm: add mandatory Max-Forwards header to local AC
Browse files Browse the repository at this point in the history
  • Loading branch information
juha-h committed May 20, 2024
1 parent ba7a490 commit 3a34b46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/tm/t_msgbuilder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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);
Expand Down

2 comments on commit 3a34b46

@linuxmaniac
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juha-h please use cherry-pick -x <SHA> when back-porting

@kamailio-sync
Copy link

@kamailio-sync kamailio-sync commented on 3a34b46 May 20, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.