[asterisk-commits] kmoore: branch 1.8 r377623 - /branches/1.8/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Dec 10 08:39:12 CST 2012
Author: kmoore
Date: Mon Dec 10 08:39:07 2012
New Revision: 377623
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=377623
Log:
Handle Session-Expires less than local Min-SE in 200 OK
Ensure that a call is immediately torn down if a Session-Expires value
received in a 200 OK is less than the local Min-SE. This also prevents
Asterisk from allowing calls with Session-Expires below the
RFC4028-mandated minimum (90s).
(closes issue ASTERISK-20653)
Review: https://reviewboard.asterisk.org/r/2237/
Patch-by: Kinsey Moore
Modified:
branches/1.8/channels/chan_sip.c
Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=377623&r1=377622&r2=377623
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Mon Dec 10 08:39:07 2012
@@ -20794,6 +20794,9 @@
rtn = parse_session_expires(p_hdrval, &tmp_st_interval, &st_ref_param);
if (rtn != 0) {
ast_set_flag(&p->flags[0], SIP_PENDINGBYE);
+ } else if (tmp_st_interval < st_get_se(p, FALSE)) {
+ ast_log(LOG_WARNING, "Got Session-Expires less than local Min-SE in 200 OK, tearing down call\n");
+ ast_set_flag(&p->flags[0], SIP_PENDINGBYE);
}
if (st_ref_param == SESSION_TIMER_REFRESHER_PARAM_UAC) {
p->stimer->st_ref = SESSION_TIMER_REFRESHER_US;
More information about the asterisk-commits
mailing list