Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1244)

Issue 2936553003: Adding PortAllocator option to support cases where sockets can't be bound. (Closed)

Created:
3 years, 6 months ago by Taylor Brandstetter
Modified:
3 years, 6 months ago
Reviewers:
Zhi Huang, pthatcher1
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, kwiberg-webrtc
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Adding PortAllocator option to support cases where sockets can't be bound. This CL adds the flag "PORTALLOCATOR_ENABLE_ANY_ADDRESS_PORTS", which will force the creation of ports not bound to any specific network interface. These are normally only used when network enumeration fails or is disabled, but in some circumstances (such as the one the test case adds), they're the only thing that works. This will result in extra ports being gathered, which is why it's only enabled behind a flag for now. In the future, we could probably introduce more sophisticated "pruning" logic that would lessen the impact of the extra ports when they're redundant, and make the flag the default. Some other minor changes that were required to make this use case work: * Allow a TCPPort to be used for outgoing connections even if it tries and fails to create a server socket. * Allow Bind to fail if being called before Connect, and the IP is an "any" address (0.0.0.0 or ::), since this bind would have been mostly pointless anyway. * Prevent P2PTransprotChannel from keeping a "backup" candidate pair using an "any address" network; we only want this for actual networks. BUG=webrtc:7798 Review-Url: https://codereview.webrtc.org/2936553003 Cr-Commit-Position: refs/heads/master@{#18578} Committed: https://chromium.googlesource.com/external/webrtc/+/1ee2125909e90058981f123a0e5a665125a92336

Patch Set 1 #

Total comments: 3

Patch Set 2 : Comment fixes #

Total comments: 16

Patch Set 3 : Minor changes (comments, renaming, etc.) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -56 lines) Patch
M webrtc/base/firewallsocketserver.h View 1 2 2 chunks +11 lines, -0 lines 0 comments Download
M webrtc/base/firewallsocketserver.cc View 1 2 2 chunks +18 lines, -0 lines 0 comments Download
M webrtc/base/natsocketfactory.cc View 4 chunks +41 lines, -20 lines 0 comments Download
M webrtc/base/network.h View 1 chunk +4 lines, -0 lines 0 comments Download
M webrtc/p2p/base/basicpacketsocketfactory.cc View 1 2 1 chunk +11 lines, -4 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel.cc View 1 2 1 chunk +18 lines, -7 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel_unittest.cc View 1 2 2 chunks +27 lines, -0 lines 0 comments Download
M webrtc/p2p/base/portallocator.h View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M webrtc/p2p/base/tcpport.h View 3 chunks +4 lines, -8 lines 0 comments Download
M webrtc/p2p/base/tcpport.cc View 1 2 chunks +13 lines, -15 lines 0 comments Download
M webrtc/p2p/client/basicportallocator.cc View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 14 (8 generated)
Taylor Brandstetter
PTAL Peter. Zhi, thought you may want to take a look as well; this is ...
3 years, 6 months ago (2017-06-13 03:41:30 UTC) #3
pthatcher1
lgtm It's all just stylish stuff. https://codereview.webrtc.org/2936553003/diff/20001/webrtc/base/firewallsocketserver.h File webrtc/base/firewallsocketserver.h (right): https://codereview.webrtc.org/2936553003/diff/20001/webrtc/base/firewallsocketserver.h#newcode61 webrtc/base/firewallsocketserver.h:61: // Set the ...
3 years, 6 months ago (2017-06-13 19:52:50 UTC) #4
Taylor Brandstetter
https://codereview.webrtc.org/2936553003/diff/20001/webrtc/base/firewallsocketserver.h File webrtc/base/firewallsocketserver.h (right): https://codereview.webrtc.org/2936553003/diff/20001/webrtc/base/firewallsocketserver.h#newcode61 webrtc/base/firewallsocketserver.h:61: // Set the IP addresses which can't be bound ...
3 years, 6 months ago (2017-06-13 22:11:18 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2936553003/40001
3 years, 6 months ago (2017-06-13 22:11:30 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2936553003/40001
3 years, 6 months ago (2017-06-13 22:21:00 UTC) #11
commit-bot: I haz the power
3 years, 6 months ago (2017-06-13 22:49:51 UTC) #14
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/external/webrtc/+/1ee2125909e90058981f123a0...

Powered by Google App Engine
This is Rietveld 408576698