- 20 Jun, 2016 9 commits
-
-
Fabrice Bellet authored
Differential Revision: https://phabricator.freedesktop.org/D931
-
Fabrice Bellet authored
In construct like "while (foo);" when foo is modified outside of the current thread, the variable should be declared volatile to suggest the compiler to read its value without making code optimization.
-
Fabrice Bellet authored
-
Fabrice Bellet authored
This patch reworks commit fc4d3aab "ignore gathering failures on auto-generated IPs", that introduces a regression in the test-fullmode check, when turn is on and use_loopback is off. The part of the test that fails is when nice_agent_gather_candidates (ragent...) should return false when the port range for the second component is already busy, line 385. In this case, agent->local_address is null, so the code path added by commit fc4d3aab is taken, and the function will return true, even when not local address has been gathered. The proper fix is to swap the inner and outer loops (on components, and on local addresses), and to go to error when all local addresses of a given component have failed, and to return false only in this case.
-
Fabrice Bellet authored
This patch fixes is bug introduced in commit 1ab9d7c1 "conncheck: Separate valid and succeded states", with the introduction of the valid flag. The agent really should go to connected state when we have a nominated pair, and not just a valid one.
-
Fabrice Bellet authored
-
Fabrice Bellet authored
The header size should be 24 bytes only, if we don't want to fuzz the payload too. Moreover, the default lambda parameter is decreased to one, to not fuzz the header too heavily, and consequently increase too much the time for the test to complete, due to exponential retransmission timeout when packets are corrupted.
-
Fabrice Bellet authored
This modification allows to gracefully recover from a first corrupted FIN segment.
-
Fabrice Bellet authored
Differential Revision: https://phabricator.freedesktop.org/D930
-
- 06 Jun, 2016 3 commits
-
-
Olivier Crête authored
Remove the whole pair before the candidate is to be freed. https://phabricator.freedesktop.org/T7460
-
Olivier Crête authored
Also reduce the normal timeout to make the test bearable. This is what RFC 5389 section 7.2.1 Differential Revision: https://phabricator.freedesktop.org/D1056 Maniphest Task: https://phabricator.freedesktop.org/T3339
-
Olivier Crête authored
We really care about the maximum transmissions, the first one counts.
-
- 03 Jun, 2016 16 commits
-
-
Olivier Crête authored
-
Olivier Crête authored
If they have data in them, they won't be recognized as duplicate acks by the sender.
-
Olivier Crête authored
This allows the sender to enter fast retransmit after a timeout because it can now detect that three duplicate acks are caused by a packet loss. As specific in RFC 6582 section 4.2.
-
Olivier Crête authored
This is recommended by RFC 6298
-
Olivier Crête authored
-
Olivier Crête authored
-
Olivier Crête authored
Accept packets much beyond the default MTU, but set a reasonable default MTU for sending of 1400
-
Olivier Crête authored
This is required as no retransmissions will happen
-
Olivier Crête authored
-
Olivier Crête authored
-
Philip Withnall authored
Correct the behaviour of pseudo_tcp_socket_get_available_bytes() and pseudo_tcp_get_available_send_space() when the socket is not in TCP_ESTABLISHED state. It’s still permissible to send and receive up until the local side calls pseudo_tcp_socket_close(), which means we may be in state TCP_ESTABLISHED *or TCP_CLOSE_WAIT*.
-
Philip Withnall authored
The state tracking previously assumed that if a FIN packet was sent, the other side received it and the preceding packets, and hence it was correct to sent an RST if an unexpected packet (such as a delayed SYN-ACK) was received. In cases where there is high packet loss, this won’t work. For example, peer A sends a SYN, it is received and peer B replies with a SYN-ACK which is also received; then peer A sends its data and a FIN, which are both dropped. Since it hasn’t received anything since the original SYN, peer B resends its SYN-ACK. If that is received, peer A was incorrectly treating it as an erroneous packet, and would then send a RST. In actual fact, it should take this as a signal that the data and FIN packets were dropped, and should resend them. TODO: Add unit tests
-
Philip Withnall authored
Otherwise we can’t easily differentiate between different transmission failures; for example: underlying socket failures, versus retransmission timeouts.
-
Philip Withnall authored
-
Philip Withnall authored
Previously, pseudo_tcp_socket_recv() would start returning 0 (EOS) as soon as a FIN segment was received from the peer, even if there was unread data already in the receive buffer. Instead, the unread data should all be accessible before pseudo_tcp_socket_recv() starts returning 0.
-
Philip Withnall authored
Previously, if peer A transmitted one or more data segments (1), followed by a FIN segment (2) to peer B, and segments 1 were dropped, peer B would not request retransmission of them and would instead continue with the FIN handshake. This effectively meant segments 1 were lost without peer B realising. Fix this by only handling the FIN segment once its sequence number is acknowledged in the receive window.
-
- 02 Jun, 2016 4 commits
-
-
Olivier Crête authored
Cleanly returnign makes no sense and may hide worse problems.
-
-
-
Olivier Crête authored
This test depends on rfc5766-turn-server which must be installed for this test to run.
-
- 01 Jun, 2016 2 commits
-
-
Jakub Adam authored
Doing so similarly to priv_process_response_check_for_reflexive(), which also sets valid flag on discovered peer reflexive pairs. Fixes a regression in previously working scenario. Differential Revision: https://phabricator.freedesktop.org/D1035
-
Jakub Adam authored
"new-selected-pair" may be emitted after "component-state-changed" to READY, by which time the main loop might have gotten quit in cb_component_state_changed(). Consequently, cb_new_selected_pair() could miss to register the selected pair, ultimately leading to an assertion failure in main(). We should wait for both selected pair and state change events to occur before stopping the main loop. Differential Revision: https://phabricator.freedesktop.org/D1044
-
- 31 May, 2016 3 commits
-
-
Olivier Crête authored
This reverts commit 01519677.
-
Olivier Crête authored
-
Jakub Adam authored
TCP active socket makes a NiceSocket for each peer in conn_check_send() and this new socket is then stored as CandidateCheckPair's 'sockptr'. We thus have to look also at the 'sockptr' value when eliminating sockets which have received HUP from connection checks. Differential Revision: https://phabricator.freedesktop.org/D1034
-
- 30 May, 2016 3 commits
-
-
Olivier Crête authored
If a socket returned an error, remove it.
-
Olivier Crête authored
-
Olivier Crête authored
The TCP-based turns don't come pre-parsed unlike the UDP variants!
-