Skip to content

Commit 308a4ad

Browse files
author
dvossel
committed
Merged revisions 285006 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r285006 | dvossel | 2010-09-03 17:21:50 -0500 (Fri, 03 Sep 2010) | 9 lines Disables auth_options_request option by default. The auth_options_request option was created to do authentication on OPTIONS request just like INVITES are done. Since it has been noted that some endpoints use OPTIONS requests as a way of qualifying a peer and that a 401 authentication response could result in interoperability issues, this option has been disabled by default. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@285007 f38db490-d61c-443f-a65b-d21fe96a405b
1 parent b906aaa commit 308a4ad

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

channels/chan_sip.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26405,7 +26405,7 @@ static int reload_config(enum channelreloadreason reason)
2640526405
sip_cfg.notifyhold = FALSE; /*!< Keep track of hold status for a peer */
2640626406
sip_cfg.directrtpsetup = FALSE; /* Experimental feature, disabled by default */
2640726407
sip_cfg.alwaysauthreject = DEFAULT_ALWAYSAUTHREJECT;
26408-
sip_cfg.auth_options_requests = 1;
26408+
sip_cfg.auth_options_requests = DEFAULT_AUTH_OPTIONS;
2640926409
sip_cfg.allowsubscribe = FALSE;
2641026410
sip_cfg.disallowed_methods = SIP_UNKNOWN;
2641126411
sip_cfg.contact_ha = NULL; /* Reset the contact ACL */
@@ -26647,8 +26647,8 @@ static int reload_config(enum channelreloadreason reason)
2664726647
} else if (!strcasecmp(v->name, "alwaysauthreject")) {
2664826648
sip_cfg.alwaysauthreject = ast_true(v->value);
2664926649
} else if (!strcasecmp(v->name, "auth_options_requests")) {
26650-
if (ast_false(v->value)) {
26651-
sip_cfg.auth_options_requests = 0;
26650+
if (ast_true(v->value)) {
26651+
sip_cfg.auth_options_requests = 1;
2665226652
}
2665326653
} else if (!strcasecmp(v->name, "mohinterpret")) {
2665426654
ast_copy_string(default_mohinterpret, v->value, sizeof(default_mohinterpret));

channels/sip/include/sip.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@
207207
#define DEFAULT_QUALIFY FALSE /*!< Don't monitor devices */
208208
#define DEFAULT_CALLEVENTS FALSE /*!< Extra manager SIP call events */
209209
#define DEFAULT_ALWAYSAUTHREJECT TRUE /*!< Don't reject authentication requests always */
210+
#define DEFAULT_AUTH_OPTIONS FALSE
210211
#define DEFAULT_REGEXTENONQUALIFY FALSE
211212
#define DEFAULT_T1MIN 100 /*!< 100 MS for minimal roundtrip time */
212213
#define DEFAULT_MAX_CALL_BITRATE (384) /*!< Max bitrate for video */

configs/sip.conf.sample

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,8 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
370370
; the ability of an attacker to scan for valid SIP usernames.
371371
; This option is set to "yes" by default.
372372

373-
;auth_options_requests = no ; sip OPTIONS requests should be treated the exact same as
374-
; an INVITE, this includes performing authentication. By default
375-
; OPTIONS requests are authenticated, however this option allows
376-
; OPTION requests to proceed unauthenticated in order to increase
377-
; performance. This may be desirable if OPTIONS are only used to
378-
; qualify the availabilty of the endpoint/extension. Disabling
379-
; this option is not recommended.
373+
;auth_options_requests = yes ; Enabling this option will authenticate OPTIONS requests just like
374+
; INVITE requests are. By default this option is disabled.
380375

381376
;g726nonstandard = yes ; If the peer negotiates G726-32 audio, use AAL2 packing
382377
; order instead of RFC3551 packing order (this is required

0 commit comments

Comments
 (0)