aboutsummaryrefslogtreecommitdiff
path: root/p2p/base
AgeCommit message (Collapse)Author
2020-05-15Clear address:port in icecandidateerror for tcp servers with private IPEldar Rello
Bug: chromium:1072401 Change-Id: I6af81a2b2b22b5f8d7edb8fb7f66f69b866db1c6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174753 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Eldar Rello <elrello@microsoft.com> Cr-Commit-Position: refs/heads/master@{#31275}
2020-05-13Add field trial to let idle connection live longer than 30sJonas Oreland
A connection is currently deleted if it has not recevied anything for 30s. This patch adds a field trial that allows modifying this value if no pings are outstanding. The motivation for this is to experiment with pinging slower than once per 30s in order to save battery. Bug: webrtc:10282 Change-Id: I3272b9d68d44fc30379bd9a6c643db6b09766486 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175005 Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31239}
2020-04-27Extend IceControllerFactoryArgs with field trial stringJonas Oreland
This patch adds a field trial string for the IceController to the factory interface, the string is from the "WebRTC-IceControllerFieldTrials" key. This makes it possible to add new field trials using that key as needed. Bug: chromium:1024965 Change-Id: I50498e45da3c49b8e1d620c90c674eedc15dc16e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173900 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31134}
2020-04-14Remove the version of Port::AddrAddress without a URL parameter.Mirko Bonadei
This version of the method is deprecated in favor of the one that takes an url parameter. Bug: webrtc:10198 Change-Id: I7614b9cb98217663b0e2fbf1785ae1fb1484beec Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173333 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31068}
2020-04-14Remove WebRTC-Rfc5389StunRetransmissions.Mirko Bonadei
Since there is no plan to follow-up on this, this CL removes the field trial and the conditional logic based on it. Bug: webrtc:11503, webrtc:10282 Change-Id: Iaf005eba6af0e23ea50456d75c5c53f37d488f7d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173477 Reviewed-by: Björn Terelius <terelius@webrtc.org> Reviewed-by: Jonas Oreland <jonaso@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31062}
2020-04-14Remove OpenSSLAdapter restartable_ data member.Mirko Bonadei
Bug: webrtc:10198 Change-Id: I5beabba3837b92d600e2d7067954adf334adbdd0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173335 Reviewed-by: Justin Uberti <juberti@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31056}
2020-04-03Temporarily increase DTLS buffer size to 2.Taylor Brandstetter
It's not expected this will make a difference, since the packet should be read from the queue if possible as soon as it's added to it. But we're doing this as an added precaution in case we overlooked something. See linked bug. Bug: chromium:1063834 Change-Id: I7a3a6d86a97683cbcbeed5ef1aaa8090cf6bf8c0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172661 Commit-Queue: Taylor <deadbeef@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30990}
2020-04-02Extend rtc::AdapterType with 2g, 3G, 4G & 5G enum values.Jonas Oreland
This patch adds new enum values for different types of cellular connections. The new costs are currently blocked when sending to remote, (so that arbitrary network switches does not starts occurring). The end-game for this series to be able to distinguish between different type of cellular connections in the ice-layer (e.g when selecting/switching connections). BUG: webrtc:11473 Change-Id: I587ac8fdff4f6cdd0f8905f327232f58818db4f6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172582 Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30970}
2020-04-01add tcptype to prflx tcp candidatesPhilipp Hancke
Adds the missing tcptype to prflx tcp candidates as tcptype is mandatory per RFC 6544 and if missing the candidate will contain double whitespace like this ... tcptype generation ... and will get rejected by the internal parser BUG=webrtc:11423 Change-Id: Id61babd85cf43d56e9e6f9bf30d4cc9e00f00f60 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170442 Reviewed-by: Taylor <deadbeef@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30959}
2020-04-01Changing from hard to soft error when temporary DTLS buffer is full.Taylor Brandstetter
We thought we had resolved this issue earlier, by reading DTLS records in a loop. But this condition may be triggered in other cases, such as when an internal DTLS error occurs and more DTLS records continue to be received afterwords. Changing this from a hard to soft error will avoid a crash (which is happening more frequently for whatever reason) and hopefully enable us to collect logs to debug the issue further. Bug: chromium:1063834 Change-Id: I22c01a9e064a9db65bab38d00c62a424b5a27437 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172560 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Jonas Oreland <jonaso@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30955}
2020-03-28Enforce "comprehension-required" STUN rules.Taylor Brandstetter
If a STUN attribute is in the "comprehension-required" range (0x0000-0x7FFF), and the implementation does not recognize it, this should be treated as an error (as per RFC5389), with different behavior depending on the type of the message received. Bug: webrtc:9063 Change-Id: Ic31b0cdd3c26772c21d770b44fe4ee4a1b47030a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/64500 Commit-Queue: Taylor <deadbeef@webrtc.org> Reviewed-by: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30925}
2020-03-27Modify IceControllerInterface::SelectConnectionToPing - step 3Jonas Oreland
this is a NOP refactoring, that modify return type of IceControllerInterface::SelectConnectionToPing to a struct (rather than existing pair). The modification is done so that one can safely add new return values in the struct. Step 1) Create a typedef for return value. - merge downstream and change it to start using new type. Step 2) Change typedef to struct, adding constructors from old type to new type merge and change downstream to use "real" constructors Step 3) remove temporary constructors Step 4) Eat cake Each step requires a merge downstream, with corresponding changes there. Bug: chromium:1024965 Change-Id: I46ad4a58426a7d33b84bc78caab55893315d25c1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171874 Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30921}
2020-03-27Implement Connection::ForgetLearnedState()Jonas Oreland
This patch adds a new ForgetLearnedState() method on a Connection. The method, puts the connection into a state similar to when it was just created. - write_state = STATE_WRITE_INIT - receving = false - throw away all pending request - reset RttEstimate All other state is kept unchanged. Note: It does not trigger SignalStateChange A subsequent patch will expose the method to the IceController. BUG: webrtc:11463 Change-Id: I055e8cd067e1bc4fd5ad64dd10f458554dbc87e3 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171805 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30916}
2020-03-27Modify IceControllerInterface::SelectConnectionToPing - step 2Jonas Oreland
this is a NOP refactoring, that modify return type of IceControllerInterface::SelectConnectionToPing to a struct (rather than existing pair). The modification is done so that one can safely add new return values in the struct. Step 1) Create a typedef for return value. - merge downstream and change it to start using new type. Step 2) Change typedef to struct, adding constructors from old type to new type merge and change downstream to use "real" constructors Step 3) remove temporary constructors Step 4) Eat cake Each step requires a merge downstream, with corresponding changes there. Bug: chromium:1024965 Change-Id: I79df9528f842ea73ca8896cedd62ad3a5cf5b767 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171807 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30914}
2020-03-26Modify IceControllerInterface::SelectConnectionToPing - step 1Jonas Oreland
this is a NOP refactoring, that modify return type of IceControllerInterface::SelectConnectionToPing to a struct (rather than existing pair). The modification is done so that one can safely add new return values in the struct. Step 1) Create a typedef for return value. - merge downstream and change it to start using new type. Step 2) Change typedef to struct, adding constructors from old type to new type merge and change downstream to use "real" constructors Step 3) remove temporary constructors Step 4) Eat cake Each step requires a merge downstream, with corresponding changes there. Bug: chromium:1024965 Change-Id: I6ebb8658a77e0ef5c24acb382c0cb6413403c168 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171691 Reviewed-by: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30902}
2020-03-25remove deprecated fields in rtc::NetworkRouteJonas Oreland
this patch is a followup to https://webrtc-review.googlesource.com/c/src/+/170628 and removed the now deprecated fields {local/remote}_network_id that is now no longer used by downstream. BUG: webrtc:11434 Change-Id: Ia322609c0b4f07b05b8592cbca7f001a115da109 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171515 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30874}
2020-03-21Refactor ssl_stream_adapter API to show object ownershipHarald Alvestrand
Backwards compatible overloads are provided. Bug: none Change-Id: I065ad6b269fe074745f9debf68862ff70fd09628 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170637 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30851}
2020-03-20Extend NetworkRoute with more info about local/remote endpointsJonas Oreland
This patch extends the NetworkRoute struct with more information about local/remote endpoints. It adds - adapter type - adapter id - relay (previously it was "only" network_id) The patch leaves the {local/remote}_network_id fields around and populated since downstream projects depend on them. They will be removed once they have migrated. OWNER: srte@ call/ test/ OWNER: asapersson@ video/ OWNER: hta@ p2p/ pc/ rtc_base/ BUG: webrtc:11434 Change-Id: I9bcec385b40d707db385fef40b2c7a315dd35dd0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170628 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Åsa Persson <asapersson@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30848}
2020-03-05Make Connection::id() constJonas Oreland
Bug: None Change-Id: I9145ba5e8ad9f80aec047227aa0a95858354fd1a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169725 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30689}
2020-03-03Unbreak ICE renominationJonas Oreland
This patch fixes a problem in https://webrtc.googlesource.com/src/+/71ff07369837d6575c04ebff7002d07d6e0af25f that when adding standard compliance validation of ufrag/pwd accidentally broken ice renomination by introducing a new "constructor". Bug: chromium:1044521 Change-Id: If1b18b1d728e55db9da385b37162a9cb5e61ac48 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169549 Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Magnus Flodman <mflodman@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30670}
2020-03-03Add field trials for sending ping on network switchesJonas Oreland
This patch introduces 2 new field trials that make p2p_transport_channel to send ping on network switches. The purpose of this is to reduce the time that the peers disagre on which connection to use. - send_ping_on_switch_ice_controlling Send a ping from the ICE_CONTROLLING side when switching connection. - send_ping_on_nomination_ice_controlled Send a ping from the ICE_CONTROLLED side when a connection has been nominated by remote side. The extra traffic by these PINGS are considered harmless since network switches does not happen that often. Bug: webrtc:10273 Change-Id: Id7abe268c79ceb2404c0543849d5666466e58d0c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169550 Reviewed-by: Magnus Flodman <mflodman@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30668}
2020-03-02Cleanup: Use common IP overhead definitions in test and prod codeSebastian Jansson
This avoid duplication. As part of this moving the overhead calculation to the IP address class so it's easier to find and more natural to use. Bug: webrtc:9883 Change-Id: If4d865f445bc1a302572896932966ce30294e339 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169445 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30657}
2020-02-24loosen ice-ufrag/ice-pwd ice-char restrictions furtherPhilipp Hancke
Loosen the restrictions for ice-char by also allowing '#' (known to break) and '_' (urlsafe base64) in addition to the existing exceptions for '-' and '='. Also fixes typo in log message. BUG=chromium:1053756 Change-Id: I8f254a7c25f780276452fa3e27245b6b7ad1a3ce Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168943 Reviewed-by: Steve Anton <steveanton@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30596}
2020-02-19loosen ice-ufrag/ice-pwd ice-char restrictionsPhilipp Hancke
Loosen the restrictions for ice-char by allowing '-' and '='. Being spec-compliant breaks interoperability. The spec-behaviour will be restored with a notice period. BUG=chromium:1053756,chromium:1044521 No-Try: True Change-Id: I880babd0869302bd713912ddfcfa48866fad32c1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168820 Commit-Queue: Steve Anton <steveanton@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30560}
2020-02-10Use newer version of TimeDelta and TimeStamp factories in webrtcDanil Chapovalov
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g" git cl format Bug: None Change-Id: I87469d2e4a38369654da839ab7c838215a7911e7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168402 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30491}
2020-02-03AsyncTCPSocket: try sending outgoing data until EWOULDBLOCKSteve Anton
The AsyncTCPSocket is an AsyncPacketSocket which means it emulates UDP-like (packet) semantics via a TCP stream. When sending, if the entire packet could not be written then the packet socket should indicate it wrote the whole thing and flush out the remaining later when the socket is available. The WriteEvent signal was already wired up but was not getting fired (at least with the virtual sockets) since it would not call Send() enough on the underlying socket to get an EWOULDBLOCK that would register the async event. This changes AsyncTCPSocket to repeatedly call Send() on the underlying socket until the entire packet has been written or EWOULDBLOCK was returned. Bug: webrtc:6655 Change-Id: I41e81e0c106c9b3e712a8a0f792d28745d93f2d2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168083 Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Commit-Queue: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30449}
2020-01-29Allow non-identical datagram transport parameters.Bjorn A Mellem
Currently, datagram transports must report identical transport parameters in order to negotiate use of the datagram transport. This is not strictly necessary, they just need parameters that fit some notion of "compatability" (eg. both ends share some mutually-supported version of the datagram protocol). This change allows datagram transports to implement their own notion of compatible transport parameters, by adding a SetRemoteTransportParameters method to DatagramTransportInterface which checks if the remote parameters are compatible with the local endpoint and returns an error if they are not. Bug: webrtc:9719 Change-Id: I166c787b468b89d9082d7e3c9995a6ed50a1650a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167741 Commit-Queue: Bjorn Mellem <mellem@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30412}
2020-01-28Remove iceRegatherIntervalRangeSteve Anton
This was an ICE configuration experiment added a couple years ago that did not end up being used. Bug: webrtc:11316 Change-Id: Iafb7e1c4f7b4598815f045808dbf6e470172f119 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167680 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Commit-Queue: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30395}
2020-01-28TCPConnection: Defer FailAndPrune by signaling to selfJonas Oreland
What steps will reproduce the problem? 1. Connect a TCPPort, creating a TCPConnection 2. Disconnect the interface (e.g turn it off in android) 3. Send Ping on the TCPConnection Crash. The TCPConnection calls FailAndPrune when it fails to reconnect the TCPConnection. FailAndPrune which removes the StunRequests. When this is called from the Ping() code, that will still access the StunRequest after the call to the Connection. Solution: Instead of calling FailAndPrune deep down in the Ping()-stack post a message to self to do this with a "clean" stack instead. BUG: webrtc:11315 Change-Id: Id328b1b7c92311fa5b9adbfd2eb1dd14bf19805d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167522 Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30389}
2020-01-28Export IceParameters::Parse for use in ChromeSteve Anton
Bug: chromium:1044521 Change-Id: I7c6fb0ba5ac918858ed65f9fe503c4de6f6acce5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167683 Commit-Queue: Steve Anton <steveanton@webrtc.org> Commit-Queue: Qingsi Wang <qingsi@webrtc.org> Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30387}
2020-01-25Validate ICE ufrag/pwd according to the specSteve Anton
https://tools.ietf.org/html/draft-ietf-mmusic-ice-sip-sdp-39#section-5.4 Bug: chromium:1044521 Change-Id: Ia95718437dfc270b52cdf822e861a3da7cbbab76 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167281 Commit-Queue: Steve Anton <steveanton@webrtc.org> Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30375}
2020-01-16Improve DTLS logging.Henrik Boström
See b/142641135. Bug: None Change-Id: I59d74b0d6c53a421d8104cc5455bab2e8dcf27d4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166048 Commit-Queue: Henrik Boström <hbos@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30280}
2020-01-15GOOG_PING: improve handshakeJonas Oreland
This patch improves handshake wrt GOOG_PING support so that - if goog_ping_enable: sender send it's goog-ping version until it gets STUN_BINDING_RESPONSE - receiver only sends it's goog-ping-version if getting a goog-ping-version in the request This means that the overhead of STUN_ATTR_GOOG_MISC_INFO is only - added on STUN_BINDING_REQUEST until a response is received. - added on STUN_BINDING_RESPONSE if remote peer request it. This is wire compatible with older versions so that - new sender will enable GOOG_PING with new/old receiver. - old sender will enable GOOG_PING with old receiver. - old version will not enable GOOG_PING with new receiver (receiver expecting sender to announce first). BUG: webrtc:11100 Change-Id: Ib3434c593988188150f4c7506918139aaf138d0c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165787 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30269}
2020-01-14Concatenate string literals at compile time.Jonas Olsson
This CL was generated by running: git ls-files | grep ".cc" | xargs perl -i -ne 'BEGIN {undef $/}; s/("[\s\n]*<<[\s\n]*")/" "/g; print;'; git cl format After that I manually edited modules/audio_processing/gain_controller2.cc to preserve its original formatting. This primary benefit of this change is a small reduction in binary size. Bug: None Change-Id: I689fa7ba9c717c314bb167e5d592c3c4e0871e29 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165961 Reviewed-by: Alessio Bazzica <alessiob@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30251}
2020-01-13Avoid [[nodiscard]] warning C4834 with MSVC 2019Jerome Humbert
Avoid a warning-as-error of MSVC 2019 due to a test ignoring a [[nodiscard]] return value: C4834: discarding return value of function with 'nodiscard' attribute Change-Id: I6b70d85769f311814393412830f48d0d8bfef63d Bug: webrtc:11275 Change-Id: I6b70d85769f311814393412830f48d0d8bfef63d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164467 Commit-Queue: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30226}
2020-01-13Flip goog_ping_announce default to falseJonas Oreland
BUG: webrtc:11100 Change-Id: I37a23b32b339c000cc2e88793c31732f7f1d259d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165686 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30223}
2020-01-10Unflake P2PTransportChannelTest.TurnToTurnPresumedWritable.Yves Gerey
Some messages were processed after involved objects were destructed, a.k.a. 'use after free'. This CL fixes that by disconnecting signals before fixture destruction, honoring CreateChannel/DestroyChannel symmetry and following what is done in similar test cases. Bug: webrtc:11269 Change-Id: I122aca70a9978b752edc01e5f31583f4425f3624 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165685 Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Commit-Queue: Yves Gerey <yvesg@google.com> Cr-Commit-Position: refs/heads/master@{#30214}
2020-01-08Cleanup: Removes redundant includes on message_queue.hSebastian Jansson
This is part of a CL series merging rtc::MessageQueue into rtc::Thread. Bug: webrtc:9883 Change-Id: I3cb857cc707d5e897759366d1478cc1ec19bce9a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165344 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30180}
2020-01-07Mark TCP connections that fail initialization as failed.Harald Alvestrand
This silences some spurious messages that were generated by https://chromium-review.googlesource.com/c/chromium/src/+/1986070 Bug: chromium:1038754 Change-Id: I950b82c01a7e5be1f5e910b148c0b201f814f430 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164529 Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30156}
2020-01-03Delete p2p/base/packet_transport_interface.hNiels Möller
This file only defined an unused alias. Bug: None Change-Id: I0c731401295814e8f5dd91f41350973021efd5d5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155173 Reviewed-by: Steve Anton <steveanton@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30138}
2019-12-16Stop an SCTP connection when the DTLS transport closes.Harald Alvestrand
This CL propagates a "closed" signal from DTLS up to the SCTP section of the data channel controller, where it causes closing of all open datachannels. Bug: chromium:1030631, webrtc:10360 Change-Id: I88bb9e1aff5c25f330edfd092ef609d4fcc3a9f8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/162206 Reviewed-by: Steve Anton <steveanton@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30099}
2019-12-11STUN PING requestJonas Oreland
This patch introduces a new type of STUN ping, GOOG_PING_REQUEST/RESPONSE which is similar to a STUN_BINDING but does not transmit any values. The Connection class automatically sends these if no STUN attributes has changed since last call to Connection::Ping() if the remote peer has signaled that it supports it. BUG=webrtc:11100 Change-Id: Ib1b590f0b90ca6cb56f2eb07cd62f976e246bc8c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159961 Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Taylor <deadbeef@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30062}
2019-12-09Add directive to make webrtc metrics optional.Ying Wang
Bug: webrtc:11144 Change-Id: I4e75e6aec033784685de3670e880bb9f2b6ee8d2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161043 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Ying Wang <yinwa@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30040}
2019-12-04Replace hostCandidate with address and port in RTCPeerConnectionIceErrorEventEldar Rello
Bug: chromium:1013564 Change-Id: Ie1bb86ed6a2a7d73fe6ee666f973d809ed05a7ed Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161084 Reviewed-by: Steve Anton <steveanton@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Eldar Rello <elrello@microsoft.com> Cr-Commit-Position: refs/heads/master@{#30004}
2019-12-03Add IceControllerEvent::ICE_CONTROLLER_RECHECKJonas Oreland
This patch adds a new enum value in IceControllerEvent::Type, that allows an IceController to request a recheck without any of the predefined event occuring. This patch is a NOP for BasicIceController. BUG=webrtc:10647 Change-Id: Idf1d0946480437109ff272946679fef559ca7beb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161047 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29976}
2019-11-29Move SendBindingResponse to ConnectionJonas Oreland
This patch moves the SendBindingResponse from Port to Connection. This is a behavioural NOP, and I don't understand why it was in Port in the firs place! Found when working on GOOG_PING. BUG=webrtc:11100 Change-Id: I0466c5381f08ec4926ca3380e6914f0bc0dfcf63 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161081 Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29963}
2019-11-28Add rtt estimate EventBasedExponentialMovingAverage to ConnectionJonas Oreland
This patch estimates the connection RTT using EventBasedExponentialMovingAverage. The half time is set to 500 but can be modified using field trials. This new metric is currently unused, but will be used for exploration of of whether it can be used instead of the existing metric. Bug: webrtc:11140 Change-Id: I9db93e9b9eb932e3cd18935cd4ce0d90fc1cb293 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161000 Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29944}
2019-11-27make Connection::port() protectedJonas Oreland
This patch makes Connection::port() protected and add explicit methods for the use cases instead - network() - port()->Network() - generation() - port()->generation() This is done to easier mock a Connection. BUG=webrtc:10647 Change-Id: I5b35477ed9f81d57cd871072874262d0a8af2d4c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160784 Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29929}
2019-11-26Delete media transport integration.Bjorn A Mellem
MediaTransport is deprecated and the code is unused. No-Try: True Bug: webrtc:9719 Change-Id: I5b864c1e74bf04df16c15f51b8fac3d407331dcd Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160620 Commit-Queue: Bjorn Mellem <mellem@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org> Reviewed-by: Åsa Persson <asapersson@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29923}
2019-11-22Make IceController injectableJonas Oreland
This patch is a follow up on - https://webrtc-review.googlesource.com/c/src/+/158820 - https://webrtc-review.googlesource.com/c/src/+/158205 And makes the IceController injectable into P2PTransportChannel. This is useful so that one can only modify the behaviour of the the controller and still use the rest of the functionality of P2PTransportChannel. Bug: chromium:1024965 Change-Id: I36a1bc5cb4a60da46935ce8e4ce43e3bbbfeaf6d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160188 Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29882}