]> 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:36:14 +0000 (15:36 -0500)
commitc265db0a0a6e6128297402c3540b0162a86e210c
treef07f662b15d234e0f3a8be68175fb8d395dec99c
parentfb53d3a79072ed172de6a0b88b801fdf9131d079
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