Commit graph

25 commits

Author SHA1 Message Date
Philipp Hancke
ff6cd53303 Reject stun urls with query parameters
for consistency with Chromium behavior, in particular
  stun:host?transport=udp
gets rejected.

BUG=chromium:1385735

Change-Id: I85a141ecf72480bfa09d8354d6dcaef8ca0cdcff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299943
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39916}
2023-04-21 11:19:37 +00:00
Jonas Oreland
3e7e15d240 Reland "move relay server priority assignment to port_allocator"
This is a reland of commit b395f5bd5c
Downstream project has been fixed.

Original change's description:
> move relay server priority assignment to port_allocator
>
> which knows more about the internals of ICE.
> Remove the relay server config priority field which was used to
> specify the relative priority of TURN servers. This is now handled
> internally by CreateRelayPortArgs without being exposed.
>
> Also rename BasicPortAllocator::AddTurnServer to
> BasicPortAllocator::AddTurnServerForTesting since it is a test-only
> method.
>
> BUG=webrtc:13195,webrtc:14539
>
> Change-Id: Id36cbf0187b7a84d1a9b53860f31994f3c7589f0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280224
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38520}

Bug: webrtc:13195,webrtc:14539
Change-Id: I617b611de97e4013c7286e3345073ca7589065c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281662
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38543}
2022-11-03 12:16:08 +00:00
Artem Titov
936c1af16d Revert "move relay server priority assignment to port_allocator"
This reverts commit b395f5bd5c.

Reason for revert: Breaks downstream project. Jonas will help to reland this CL.

Original change's description:
> move relay server priority assignment to port_allocator
>
> which knows more about the internals of ICE.
> Remove the relay server config priority field which was used to
> specify the relative priority of TURN servers. This is now handled
> internally by CreateRelayPortArgs without being exposed.
>
> Also rename BasicPortAllocator::AddTurnServer to
> BasicPortAllocator::AddTurnServerForTesting since it is a test-only
> method.
>
> BUG=webrtc:13195,webrtc:14539
>
> Change-Id: Id36cbf0187b7a84d1a9b53860f31994f3c7589f0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280224
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38520}

Bug: webrtc:13195,webrtc:14539
Change-Id: I7ca087a272793908f003cea6c32efe6214e54028
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281340
Owners-Override: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38524}
2022-11-01 13:29:28 +00:00
Philipp Hancke
b395f5bd5c move relay server priority assignment to port_allocator
which knows more about the internals of ICE.
Remove the relay server config priority field which was used to
specify the relative priority of TURN servers. This is now handled
internally by CreateRelayPortArgs without being exposed.

Also rename BasicPortAllocator::AddTurnServer to
BasicPortAllocator::AddTurnServerForTesting since it is a test-only
method.

BUG=webrtc:13195,webrtc:14539

Change-Id: Id36cbf0187b7a84d1a9b53860f31994f3c7589f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280224
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38520}
2022-11-01 09:59:37 +00:00
Philipp Hancke
633dc2fd10 Reland "ice server parsing: return RTCError with more details"
This is a reland of commit c4b0bde7f2
which changes the name of the new method and adds a deprecated
backward compatible variant with the old name.

Original change's description:
> ice server parsing: return RTCError with more details
>
> surfacing those errors to the API (without specific details) instead of just the logging.
>
> BUG=webrtc:14539
>
> Change-Id: Id907ebeb08b96b0e4225a016a37a12d58889091b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278340
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#38356}

Bug: webrtc:14539
Change-Id: I0a5482e123f25867582d62101b31ed207b95ea1a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278962
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38364}
2022-10-12 11:23:22 +00:00
Mirko Bonadei
4d47e0b2be Revert "ice server parsing: return RTCError with more details"
This reverts commit c4b0bde7f2.

Reason for revert: Breaks downstream tests.

Basically, ParseIceServers() and other functions have changed
the return type, and this breaks tests at compile time.

Is it possible to reland with backwards compatible versions that return
the previous type? Then they can be removed afterwards.

Original change's description:
> ice server parsing: return RTCError with more details
>
> surfacing those errors to the API (without specific details) instead of just the logging.
>
> BUG=webrtc:14539
>
> Change-Id: Id907ebeb08b96b0e4225a016a37a12d58889091b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278340
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#38356}

Bug: webrtc:14539
Change-Id: I4df936ff865f87759936c5d0425478fe51051dc8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278960
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38359}
2022-10-12 06:52:52 +00:00
Philipp Hancke
c4b0bde7f2 ice server parsing: return RTCError with more details
surfacing those errors to the API (without specific details) instead of just the logging.

BUG=webrtc:14539

Change-Id: Id907ebeb08b96b0e4225a016a37a12d58889091b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278340
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38356}
2022-10-11 15:25:29 +00:00
Niels Möller
6d122623ef Refactor ParseIceServerUrl to use absl::string_view
Bug: webrtc:13579
Change-Id: Icbcee2348dab7aae1c43ff073480f2a1ede8041f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264545
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37117}
2022-06-03 13:39:53 +00:00
Niels Möller
e66b83f8ad Never pass a signed char to ctype macros like isdigit()
Bug: None
Change-Id: I451bb2c1f175a77aefbc8363009bf35a769fe941
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264442
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37037}
2022-05-30 13:05:03 +00:00
Niels Möller
4662f53285 Add string_view version of cricket::StringToProto
And deprecate old version.

Bug: webrtc:13579
Change-Id: I3eda669fdaa814c0e3c75a78242279bf9e526b1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262241
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36999}
2022-05-25 08:44:21 +00:00
Harald Alvestrand
c24a2189d7 Update IWYU tool with a mapping file
Also apply IWYU to all .cc files in pc/, and correct BUILD file to match.
Note: Some files came out wrong when iwyu was applied. These are not included.

Bug: none
Change-Id: Ib5ea46b8fcc505414d0447cca7218ad3afc2e321
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252280
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36064}
2022-02-24 11:05:06 +00:00
Harald Alvestrand
ef5b21e637 Deprecate and remove usage for WARNING log level
Bug: webrtc:13362
Change-Id: Ida112158e4ac5f667e533a0ebfedb400c84df4d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239124
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35425}
2021-11-27 22:21:54 +00:00
Artem Titov
d3251968d1 Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.

Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
2021-11-15 21:44:59 +00:00
Philipp Hancke
05fadaccee make ice server parsing error and logging more consistent
BUG=None

Change-Id: I1b88d01f8e592b11df31030ee70e6a39a4155773
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237220
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#35307}
2021-11-04 11:51:40 +00:00
Niels Möller
634f27950e Delete redundant function rtc::tokenize_with_empty_tokens
It was identical to rtc::split.

Bug: webrtc:6424
Change-Id: I1118ad34050c0eb324ade347c97174f3ad4b39a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231234
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34946}
2021-09-08 09:16:09 +00:00
Artem Titov
cfea2182f8 Use backticks not vertical bars to denote variables in comments
Bug: webrtc:12338
Change-Id: I89c8b3a328d04203177522cbdfd9e606fd4bce4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228246
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34696}
2021-08-10 10:40:03 +00:00
Artem Titov
880fa8169b Reland "Use backticks not vertical bars to denote variables in comments for /pc"
Original change's description:
> Revert "Use backticks not vertical bars to denote variables in comments for /pc"
>
> This reverts commit 37ee0f5e59.
>
> Reason for revert: Revert in order to be able to revert https://webrtc-review.googlesource.com/c/src/+/225642
>
> Original change's description:
> > Use backticks not vertical bars to denote variables in comments for /pc
> >
> > Bug: webrtc:12338
> > Change-Id: I88cf10afa5fc810b95d2a585ab2e895dcc163b63
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226953
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Artem Titov <titovartem@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#34575}
>
> TBR=hta@webrtc.org,titovartem@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I5eddd3a14e1f664bf831e5c294fbc4de5f6a88af
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:12338
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227082
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34577}

Bug: webrtc:12338
Change-Id: I96bd229b73613c162d11d75fa4f5934e1b4295c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227087
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34611}
2021-07-30 22:13:59 +00:00
Björn Terelius
fd05d6f504 Revert "Use backticks not vertical bars to denote variables in comments for /pc"
This reverts commit 37ee0f5e59.

Reason for revert: Revert in order to be able to revert https://webrtc-review.googlesource.com/c/src/+/225642

Original change's description:
> Use backticks not vertical bars to denote variables in comments for /pc
>
> Bug: webrtc:12338
> Change-Id: I88cf10afa5fc810b95d2a585ab2e895dcc163b63
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226953
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34575}

TBR=hta@webrtc.org,titovartem@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I5eddd3a14e1f664bf831e5c294fbc4de5f6a88af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12338
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227082
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34577}
2021-07-27 22:10:24 +00:00
Artem Titov
37ee0f5e59 Use backticks not vertical bars to denote variables in comments for /pc
Bug: webrtc:12338
Change-Id: I88cf10afa5fc810b95d2a585ab2e895dcc163b63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226953
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34575}
2021-07-27 20:52:02 +00:00
Harald Alvestrand
5761e7b3ff Running apply-iwyu on ~all files in pc/
Bug: none
Change-Id: Ieebdfb743e691f7ae35e1aa354f68ce9e771064d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204381
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33105}
2021-01-29 16:14:10 +00:00
Harald Alvestrand
a3dd772e7a Add create function for PeerConnection that can return an error.
Needed in order to return different codes for different failures
in initialization.

Sideswipe: Check TURN URL hostnames for illegal characters.

Bug: webrtc:12238
Change-Id: I1af3a37b9654b83b268304f7356049f9f3786b7a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195541
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32710}
2020-11-27 11:08:10 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Niels Möller
db4def9f59 Update parsing of stun and turn urls for RFC 7064-7065
Main change is deleting support for @userinfo in turn urls. This was
specified in early internet drafts, but never made it into RFC 7065.

Bug: webrtc:6663, webrtc:10422
Change-Id: Idd315a9e6001326f3104be62be3bd0991adc7db4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128423
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27171}
2019-03-19 08:13:13 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
1c05765831 (3) Rename files to snake_case: move the files
Mechanically generated with this command:

tools_webrtc/do-rename.sh move all-renames.txt

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8b05b6eab9b9d18b29c2199bbea239e9add1e690
Reviewed-on: https://webrtc-review.googlesource.com/c/115481
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26225}
2019-01-11 17:05:20 +00:00
Renamed from pc/iceserverparsing.cc (Browse further)