]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip.c: Prevent address change on unauthenticated SIP request.
authorBen Ford <bford@digium.com>
Mon, 21 Oct 2019 19:55:06 +0000 (14:55 -0500)
committerBenjamin Keith Ford <bford@digium.com>
Thu, 21 Nov 2019 20:37:02 +0000 (15:37 -0500)
commit92499125e8f4b88707b2606186d8cfa2be587918
tree882e255febf882d576f808ca98611ba81cdfabb4
parent5ffe12b6ef30cd503f85d75745fd8d9c2cfafe47
chan_sip.c: Prevent address change on unauthenticated SIP request.

If the name of a peer is known and a SIP request is sent using that
peer's name, the address of the peer will change even if the request
fails the authentication challenge. This means that an endpoint can
be altered and even rendered unusuable, even if it was in a working
state previously. This can only occur when the nat option is set to the
default, or auto_force_rport.

This change checks the result of authentication first to ensure it is
successful before setting the address and the nat option.

ASTERISK-28589 #close

Change-Id: I581c5ed1da60ca89f590bd70872de2b660de02df
(cherry picked from commit c2279540bade208dad35f7760ebd4a7cc94731fe)
channels/chan_sip.c