1. 12 Jun, 2017 1 commit
    • Fabrice Bellet's avatar
      stun timer: make properties for stun timer tunables · 8bb210c5
      Fabrice Bellet authored
      Three STUN binding request properties should be customisable. RFC 5245
      describes the retransmission timer of the STUN transaction 'RTO', and
      RFC 5389 describes the number of retransmissions to send until a
      response is received 'Rc'. The third property is the 'RTO' when
      a reliable connection is used.
      RFC 5389 introduces a supplementary property 'Rm' as a multiplier used
      to compute the final timeout RTO * Rm. However, this property is not
      added in libnice, because this would require breaking the public API for
      STUN. Currently, our STUN implementation hardcodes a division by two for
      this final timeout.
      Differential Revision: https://phabricator.freedesktop.org/D1109
  2. 24 May, 2017 1 commit
    • Fabrice Bellet's avatar
      discovery: set the initial timer delay to 100ms · aff08e49
      Fabrice Bellet authored
      With this patch we change the initial timer delay from 200ms to 100ms.
      This is related to previous commit "stun timer: move back to 5
      retransmissions". With 5 retransmissions and an initial timer delay
      of 100ms, it gives 1900ms to discover the local candidates.
  3. 03 Jun, 2016 1 commit
    • Olivier Crête's avatar
      SPECIFIC: Allow creating a GIOStream with a non-reliable agent · 418bfbcb
      Olivier Crête authored
      Only usable with the patches from
      SPECIFIC: agent: Fix GSource dispatches for UDP NiceOutputStreams
      The GSource created by g_pollable_output_stream_create_source() on a
      NiceOutputStream would never have been dispatched, due to not having any
      poll events (or anything else); it only works for TCP streams because of
      a GCancellable child source which is triggered by the TCP code.
      Fix that by making ComponentSource suitable for G_IO_IN and G_IO_OUT
      again, and adding that as a child source for UDP output stream GSources.
      agent: SPECIFIC: Drop support for reliable streams
      libnice should not be implementing pseudo-TCP support internally — it
      should provide the PseudoTcpSocket as a separate API which user code can
      use if it needs. If this were to be upstreamed, a deprecation path would
      have to be written, continuing to support the old API. However, that
      would take too long, so this commit just rips it all out.
      This commit *must not* be upstreamed.
      agent: Add nice_agent_get_socket() to return a GDatagramBased
      TODO: Needs documentation and testing.
      This bumps the GLib dependency to 2.46 for GDatagramBased.
      agent: Remove nice_agent_get_io_stream()
      It has been replaced by nice_agent_get_socket().
      TODO: This needs documenting and testing.
      TODO: This should *not* go upstream without turning it into a
  4. 27 May, 2016 2 commits
  5. 01 Mar, 2016 1 commit
  6. 01 Oct, 2015 2 commits
  7. 02 Sep, 2015 1 commit
  8. 09 Oct, 2014 1 commit
  9. 23 Sep, 2014 1 commit
  10. 22 Sep, 2014 1 commit
    • Philip Withnall's avatar
      agent: Remove dangling pointers on NiceSocket destruction · f6337b53
      Philip Withnall authored
      If a NiceSocket is destroyed, various pointers are currently left
      dangling to it in the conncheck state. These can cause crashes if (for
      example) a CandidateCheckPair with such a dangling pointer is then used;
      the GSocket methods will fail.
      Fix this by explicitly removing the socket and all NiceCandidates which
      wrap it from various areas of the state.
  11. 19 Sep, 2014 2 commits
    • Philip Withnall's avatar
      agent: Clear existing GSource timeouts before adding new ones · 5ed865fb
      Philip Withnall authored
      Modify agent_timeout_add_with_context() to force destroying and freeing
      of an existing GSource before overwriting it with a new one (probably
      with an updated timeout period).
      This fixes a case in priv_map_reply_to_relay_refresh() where the TURN
      candidate refresh timer was being overwritten with a new one, without
      the old one being destroyed. This lead to two timeouts existing, only
      one of which would be destroyed when the CandidateRefresh struct was
      freed, leaking the other one (in the main context) and allowing it to be
      later dispatched with a dangling CandidateRefresh pointer.
      The modification to agent_timeout_add_with_context() should prevent this
      happening in new code in future.
    • Philip Withnall's avatar
      agent: Add names to timer GSources · e5fbdbe6
      Philip Withnall authored
      Modify the agent_timeout_add_with_context() utility function to
      automatically add names to the timer GSources it creates. This makes
      them a little easier to identify when debugging.
  12. 25 Jul, 2014 1 commit
  13. 23 Jul, 2014 1 commit
  14. 17 May, 2014 8 commits
    • Olivier Crête's avatar
      agent: Separate reliability from ice-tcp vs ice-udp · 18e5dff4
      Olivier Crête authored
      We want ICE-TCP to not have reliable behavior unless the agent
      is reliable otherwise it will confuse existing VoIP applications.
    • Olivier Crête's avatar
      discovery: Make it less likely that a locally assigned remote foundation... · 4b7ae860
      Olivier Crête authored
      discovery: Make it less likely that a locally assigned remote foundation clashes with the remote one.
    • Olivier Crête's avatar
      discovery: Compare turn server when assigning foundations · 9be4b5a0
      Olivier Crête authored
      The RFC says that "for reflexive and relayed candidates, the STUN or TURN servers
      used to obtain them have the same IP address."
    • Olivier Crête's avatar
    • Olivier Crête's avatar
    • Olivier Crête's avatar
      discovery: Differentiate socket creation failure from other errors · 747364e2
      Olivier Crête authored
      If the socket can't be bound, then trying another port makes sense,
      otherwise it doesn't.
    • Youness Alaoui's avatar
      Add TCP server reflexive candidates · 9f0dfa2d
      Youness Alaoui authored
      For TCP server reflexive candidates, since STUN can't work on TCP
      candidates, we will use STUN on UDP or TCP and once we get an
      externally mapped address, we will create a server reflexive candidate
      for all local TCP candidates that share the same base address, and use
      the same mapped port as the base addresse's port.
    • Youness Alaoui's avatar
      Add support for ICE-TCP · a6954838
      Youness Alaoui authored
      This is a massive commit that can't be split. We add ice-tcp support
      into the agent by creating local host tcp-active/tcp-passive candidates.
      We also need to find the local and remote candidates whenever we discover
      a peer-reflexive because their data is important to setup the peer-reflexive
      so a few changes were added to look for the local or remote candidate.
      For TCP-ACTIVE remote peer-reflexive candidates, we can't add conncheck
      pairs normally because TCP-PASSIVE (local) do not generate candidate pairs,
      and we also can't have a connection from any local host, so we can only create
      a single candidatepair with the local/remote that are connected.
      The pair->socket of a candidate check pair will hold the connected tcp socket
      (through connect for ACT or accept for PASS) and we will either have a
      remote or a local peer-reflexive which will create a new candidate pair,
      we cannot trigger checks on the initial candidate pair, we must only do it
      on the new check pairs. but in the case of a tcp-passive, we don't get a new
      local peer-reflexive candidate, so there is no new candidate with a new NiceSocket, so
      when we get a triggered check, we need to match it to the candidate check pair
      or when we select a pair, it will still use the original TCP-PASS socket.
      We must store the new connected tcp socket in the peer reflexive candidates
      since they represent that unique peer-reflx candidate's connection
  15. 15 May, 2014 7 commits
  16. 25 Apr, 2014 6 commits
  17. 01 Apr, 2014 1 commit
  18. 31 Mar, 2014 1 commit
  19. 24 Feb, 2014 1 commit