]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_rtp_asterisk: Fix regression issues with DTLS client check
authorGeorge Joseph <gjoseph@sangoma.com>
Fri, 15 Dec 2023 16:37:54 +0000 (09:37 -0700)
committerGeorge Joseph <gjoseph@sangoma.com>
Wed, 20 Dec 2023 14:02:29 +0000 (14:02 +0000)
commita4f9d885a7ff6f9aefabf74323fda224e1047d02
treefcd64173d0c26c7526d12cfb6cea8b2ee77d8ef7
parent85fc4ce712f611f0eb607d86f55fade33c3d0b50
res_rtp_asterisk: Fix regression issues with DTLS client check

* Since ICE candidates are used for the check and pjproject is
  required to use ICE, res_rtp_asterisk was failing to compile
  when pjproject wasn't available.  The check is now wrapped
  with an #ifdef HAVE_PJPROJECT.

* The rtp->ice_active_remote_candidates container was being
  used to check the address on incoming packets but that
  container doesn't contain peer reflexive candidates discovered
  during negotiation. This was causing the check to fail
  where it shouldn't.  We now check against pjproject's
  real_ice->rcand array which will contain those candidates.

* Also fixed a bug in ast_sockaddr_from_pj_sockaddr() where
  we weren't zeroing out sin->sin_zero before returning.  This
  was causing ast_sockaddr_cmp() to always return false when
  one of the inputs was converted from a pj_sockaddr, even
  if both inputs had the same address and port.

Resolves: #500
Resolves: #503
Resolves: #505
include/asterisk/res_pjproject.h
res/res_pjproject.c
res/res_rtp_asterisk.c