1. 02 Nov, 2021 1 commit
  2. 01 Nov, 2021 4 commits
    • Fabrice Bellet's avatar
      agent: ensure suceeded and discovered pairs fail the same time · 01e2de64
      Fabrice Bellet authored
      This patch ensures that related succeeded-discovered pairs change to
      state failed simultaneously, to avoid leaving dangling pointers if one
      is freeed while the other is still in the conncheck list. Such
      transition is very rare, and only occurs in regular nomination mode,
      when the network conditions change between the time the pair is
      initially discovered and the time it is rechecked with the use-candidate
      flag.
      01e2de64
    • Xavier Claessens's avatar
      Fix error when crypto/ssl libs are found without pkg-config · 574f44b4
      Xavier Claessens authored
      In that case crypto_dep is a list and we can't call .found() method.
      574f44b4
    • Juan Navarro's avatar
      agent: Unify constructors into nice_agent_new_full · bddeefdf
      Juan Navarro authored
      Instead of having 3 independent implementations, make the simpler
      versions delegate into the full one.
      
      The simplest constructor needs to pass "no option", for which no
      constant exists in the NiceAgentOption enum. Thus the new
      NICE_AGENT_OPTION_NONE constant is added to reflect this possibility.
      bddeefdf
    • Ole André Vadla Ravnås's avatar
      Use native crypto support on Windows by default · 48a8a498
      Ole André Vadla Ravnås authored
      As we only need a few primitives there isn't much OS-specific code
      needed, and for applications that don't already depend on OpenSSL or
      GnuTLS it simplifies the build process quite a lot.
      
      Note that we use the vintage WinCrypt APIs as the Cryptography Next
      Generation APIs are only available on Vista and newer.
      48a8a498
  3. 04 Oct, 2021 1 commit
    • Fabrice Bellet's avatar
      component: reset the stun agent on ice restart · 47a96334
      Fabrice Bellet authored
      The stun agent may contain references to the password previously stored
      in some remote candidates, freeed by nice_component_restart(), that were
      used by keep-alive stun requests. These stun replies may arrive later
      after ice has been restarted. Since the remote candidates are freeed
      when ice is restarted, the stun agent must be reset to get rid of these
      related references.
      47a96334
  4. 01 Oct, 2021 2 commits
  5. 19 Aug, 2021 3 commits
  6. 21 Jul, 2021 1 commit
  7. 20 Jul, 2021 6 commits
  8. 13 May, 2021 2 commits
  9. 11 May, 2021 1 commit
  10. 10 May, 2021 1 commit
  11. 09 May, 2021 1 commit
  12. 03 May, 2021 4 commits
  13. 20 Apr, 2021 11 commits
    • Fabrice Bellet's avatar
      agent: avoid leak of all turn refreshes when disposing the agent · caf9f1d8
      Fabrice Bellet authored
      With this patch we free all outstanding refreshes when the agent dispose
      method is called, even those that are in the way to be discarded
      asynchronously, when a stream is removed.
      
      We also make the final user callback of the refresh proces synchronous,
      so we don't have to deal with an heap use-after-free problem. This also
      requires to order some parts of code.
      caf9f1d8
    • Fabrice Bellet's avatar
      discovery: fix asynchronous agent refreshes pruning · e7b0b786
      Fabrice Bellet authored
      Asynchronous refreshes pruning may occur when the agent async close
      function is called, but also when a stream is closed. A flag
      'discarding' is used in the CandidateRefresh object to determine
      if a refresh is already on the way to be asynchronously freed. A refresh
      definitely freed is removed from agent refresh_list.
      
      When the agent async close function is called, it is passed a user
      callback that will be invoked when all refreshes have been freed.
      
      This is not exactly how things work currently, because right now, the
      callback function is also invoked when all CandidateRefresh objects have
      the discarding flag set, with the test 'data->items_to_free==0'. In that
      case, clearly not all refreshes have been freed, as some are still there
      in the refresh_list with the discarding flag set.
      
      This is probably not what the user expects from the function
      nice_agent_close_async(), where the callback is supposed to be invoked
      after all refreshes have been freed: and including those asynchronously
      pruned by nice_prune_stream_async().
      
      This patch adds a supplementary timeout when closing the agent async,
      that waits until the agent refresh list becomes empty.
      e7b0b786
    • Fabrice Bellet's avatar
      agent: avoid leak of turn refreshes · 3e3a2b62
      Fabrice Bellet authored
      We keep refreshes having the discarding flag set. They may be freed later
      if the agent main context remains alive after agent deletion.
      3e3a2b62
    • Fabrice Bellet's avatar
      agent: warn when closing the agent with alive turn refreshes · bbf7f2d7
      Fabrice Bellet authored
      This patch suggests the developer to close its alive reservations on
      the turn server before disposing the agent.
      
      Not removing reservations on the turn server, will make them alive until
      their default timeout, generally 300 seconds, which is not fair for the
      turn server resources, but also it may cause a fatal error 437,
      "Mismatched allocation: wrong transaction ID", when another agent tries
      to contact the same turn server using the same nat mapping before this
      delay expires.
      bbf7f2d7
    • Olivier Crête's avatar
      agent: Verify the source before dereferencing the pointer · 8ccac4b0
      Olivier Crête authored
      The reason is that the component object could have been destroyed in the
      mean time.
      8ccac4b0
    • Fabrice Bellet's avatar
      a3f53566
    • Fabrice Bellet's avatar
      b353f30c
    • Fabrice Bellet's avatar
      agent: keep a track of the candidate refreshes being pruned · 48dac0d7
      Fabrice Bellet authored
      Refreshes with zero lifetime sent over tcp transport may cause the
      removal of the underlying socket when the remote peer closes the
      connection taking our request into account. These refreshes must be
      tracked and freeed on our side to avoid retransmission attempt on a
      closed socket and a heap-use-after-free error in that case.
      48dac0d7
    • Ole André Vadla Ravnås's avatar
      interfaces: Skip special interfaces on Apple OSes · e1a84135
      Ole André Vadla Ravnås authored
      Including unused utun devices.
      e1a84135
    • Ole André Vadla Ravnås's avatar
      interfaces: Skip special interfaces on Apple OSes · 5d868c74
      Ole André Vadla Ravnås authored
      Including unused utun devices.
      5d868c74
    • Olivier Crête's avatar
  14. 19 Apr, 2021 2 commits