]> 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:46:05 +0000 (09:46 -0600)
commit8cdaa93e658a46e7baf6b606468b5e2c88a0133b
treecbfea901a7b84cd020b91aaa8fcf8e91ddf06c73
parenta1eb0d73559e39ecfaa37f36e79eec4bea52bce9
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