-
Notifications
You must be signed in to change notification settings - Fork 84
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
sipsess: allow UPDATE and INFO in early dialog #878
Conversation
13f3992
to
c6e618d
Compare
This looks fine to me, please merge if this looks okay... |
@@ -253,7 +253,7 @@ static void target_refresh_handler(struct sipsess_sock *sock, | |||
return; | |||
} | |||
|
|||
if (got_offer || is_invite) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We think that here a negative reply should be sent if the SDP is not allowed.
Another commit will follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|| sess->terminated || sess->awaiting_answer) | ||
if (!sess || (!sess->established && !sess->refresh_allowed && | ||
mbuf_get_left(desc)) || sess->terminated || sess->awaiting_answer | ||
|| !sip_dialog_established(sess->dlg)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split up this into 2-3 different if-s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/sipsess/update.c
Outdated
|| sess->awaiting_answer) | ||
if ((!sess->established && !sess->refresh_allowed | ||
&& mbuf_get_left(sess->desc)) || sess->awaiting_answer | ||
|| !sip_dialog_established(sess->dlg)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related. The check is not needed here. The function is not in the API. So we can drop this in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
if (!desc) { | ||
err = ENOMEM; | ||
goto out; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add an empty line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
225257c
to
46ea2fa
Compare
46ea2fa
to
c076c9c
Compare
According to RFC 3261 section 12.1
This means that UPDATE (or INFO) requests are allowed within early dialogs (RFC 6086 mentions this in section 4.2.1, RFC 3311 in section 5.1).
However, UPDATEs with SDP offers or answers are still only allowed in "early confirmed dialogs" which have been confirmed by a PRACK (see RFCs 3311 and 6337).