Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sip/transp: Allow ACK w/o Max-Forwards header #1124

Merged
merged 5 commits into from
May 21, 2024
Merged

sip/transp: Allow ACK w/o Max-Forwards header #1124

merged 5 commits into from
May 21, 2024

Conversation

juha-h
Copy link
Contributor

@juha-h juha-h commented May 19, 2024

No description provided.

src/sip/transp.c Outdated
@@ -334,7 +334,10 @@ static void sip_recv(struct sip *sip, const struct sip_msg *msg,

if (msg->req) {
if (!have_essential_fields(msg)){
(void)sip_reply(sip, msg, 400, "Bad Request");
if (!pl_strcmp(&msg->met, "ACK"))
DEBUG_WARNING("Received bad ACK request\n");
Copy link
Contributor

Choose a reason for hiding this comment

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

WARNING is perhaps a bit strict, perhaps INFO or DEBUG is better.

Remember what they said at IETF; Be conservative in what you send, be liberal in what you receive.

Perhaps also add some more info in the log message, for example
where is came from ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll try to improve the message. About being liberal, pjsip does accept ACK w/o Max-Forwards. It really does not cause any harm in ACK.

@alfredh
Copy link
Contributor

alfredh commented May 19, 2024

Max-Forwards is decremented by one for each SIP proxy, and for the ACK request this header is not really so useful.

It should be fine to accept incoming ACK w/o Max-Forwards header...

@juha-h juha-h changed the title Print debug warning when bad ACK is received Allow ACK w/o Max-Forwards header May 19, 2024
@juha-h
Copy link
Contributor Author

juha-h commented May 19, 2024 via email

@sreimers sreimers changed the title Allow ACK w/o Max-Forwards header sip/transp: Allow ACK w/o Max-Forwards header May 20, 2024
src/sip/transp.c Outdated Show resolved Hide resolved
@sreimers sreimers merged commit 24671f1 into main May 21, 2024
37 checks passed
@sreimers sreimers deleted the bad_acc branch May 21, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants