]> 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)
committerGerrit <noreply@gerrit.asterisk.org>
Thu, 21 Nov 2019 15:45:35 +0000 (09:45 -0600)
commitc2279540bade208dad35f7760ebd4a7cc94731fe
tree123a1248182e34267a8ea580573209aa42697503
parentbb732e4292f4d84e5cca5f58b43d8c082c64ba23
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
channels/chan_sip.c