Prevent potential infinite outbound authentication loops in registration.
authorMark Michelson <mmichelson@digium.com>
Thu, 18 Dec 2014 15:40:13 +0000 (15:40 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 18 Dec 2014 15:40:13 +0000 (15:40 +0000)
commit2f3e5b494a213c20d93257a17b98a5a08525ccc1
treea06e3434eeeda30541bef371632f0548fe4ee1bd
parent2b1f2b5c1f038ad6f470b2d0cc6569bdeb7923b6
Prevent potential infinite outbound authentication loops in registration.

Prior to this patch, Asterisk would always respond to 401 responses to
registration attempts by trying to provide a registration with authentication
credentials. Even if subsequent attempts were rejected with 401 responses,
Asterisk would continue this behavior. If authentication credentials were
incorrect, this could continue forever.

With this patch, we keep track of whether we have attempted authentication
on an outbound registration attempt. If we already have, we don not try
again until the next attempt. This prevents the infinite loop scenario.

Review: https://reviewboard.asterisk.org/r/4273
........

Merged revisions 429761 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_pjsip_outbound_registration.c