[Asterisk-cvs] asterisk/channels chan_sip.c,1.361,1.362
markster at lists.digium.com
markster at lists.digium.com
Mon May 3 01:07:01 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv19451/channels
Modified Files:
chan_sip.c
Log Message:
Add "insecure=very" where we don't authenticate peers who are registered
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.361
retrieving revision 1.362
diff -u -d -r1.361 -r1.362
--- chan_sip.c 3 May 2004 05:03:19 -0000 1.361
+++ chan_sip.c 3 May 2004 05:14:52 -0000 1.362
@@ -4502,6 +4502,11 @@
strncpy(p->context, peer->context, sizeof(p->context) - 1);
strncpy(p->peersecret, peer->secret, sizeof(p->peersecret) - 1);
strncpy(p->peermd5secret, peer->md5secret, sizeof(p->peermd5secret) - 1);
+ if (peer->insecure > 1) {
+ /* Pretend there is no required authentication if insecure is "very" */
+ strcpy(p->peersecret, "");
+ strcpy(p->peermd5secret, "");
+ }
p->callgroup = peer->callgroup;
p->pickupgroup = peer->pickupgroup;
p->capability = peer->capability;
@@ -6704,7 +6709,12 @@
else
peer->capability &= ~format;
} else if (!strcasecmp(v->name, "insecure")) {
- peer->insecure = ast_true(v->value);
+ if (!strcasecmp(v->value, "very")) {
+ peer->insecure = 2;
+ } else if (ast_true(v->value))
+ peer->insecure = 1;
+ else
+ peer->insecure = 0;
} else if (!strcasecmp(v->name, "qualify")) {
if (!strcasecmp(v->value, "no")) {
peer->maxms = 0;
More information about the svn-commits
mailing list