we will periodically check if any network does not have any connection on it and if yes, attempt to re-gather on those networks.
BUG=
R=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/2025573002 .
Cr-Commit-Position: refs/heads/master@{#13367}
if the network monitor detects it after the native code does.
Also set the network cost for ethernet, wifi, unknown, cellular network type to be 0, 10, 50, 900,
so that unknown networks will have lower precedence than known networks with low cost (like Wifi) but higher precedence than known networks with high cost.
And third, infer network type based on limited name matching in Android if there is no network monitor or network monitor did not find the type.
BUG=webrtc:5890
R=pthatcher@chromium.org, pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1976683003 .
Cr-Commit-Position: refs/heads/master@{#12833}
This propagated into various other places. Also had to #include headers that
were implicitly pulled by "scoped_ptr.h".
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1920043002
Cr-Commit-Position: refs/heads/master@{#12501}
on an IPv6 network that contains the actual default local address. This is for preventing potential IP leaking.
BUG=webrtc:5376
Review URL: https://codereview.webrtc.org/1837823005
Cr-Commit-Position: refs/heads/master@{#12417}
Also include that in the stun-ping request as part of the
network-info attribute.
Change the network cost to be 16 bits.
BUG=
Review URL: https://codereview.webrtc.org/1815473002
Cr-Commit-Position: refs/heads/master@{#12110}
Plus, in stunport, turnport and allocation sequence, create a socket using the new interface.
BUG=
Review URL: https://codereview.webrtc.org/1556743002
Cr-Commit-Position: refs/heads/master@{#11279}
Fixed misusage of Connection function and also fixed the test case.
BUG=webrtc:5430
Review URL: https://codereview.webrtc.org/1592763003
Cr-Commit-Position: refs/heads/master@{#11278}
We'll only use temporary address for IPv6. However, due to a bug in iOS sdk, the necessary headers are not included. This change copies the minimum necessary definitions such that we could retrieve the ip attributes.
BUG=webrtc:4343
Review URL: https://codereview.webrtc.org/1531763006
Cr-Commit-Position: refs/heads/master@{#11114}
1. It signals network changed events whenever there are more than one IP address in a network.
2. It does not signal network changed events if a network disconnects and connects again.
Also changed DumpNetworks for better debugging.
BUG=webrtc:5096
Review URL: https://codereview.webrtc.org/1421433003
Cr-Commit-Position: refs/heads/master@{#11107}
Adapter enumeration disable should be a concept from Network. Network will be hooked up with media permission (mic/camera) to check whether gathering local address is allowed.
BUG=crbug.com/520101
R=juberti@webrtc.org, pthatcher@webrtc.org
Committed: ba9ab4cd8d
Review URL: https://codereview.webrtc.org/1284113003 .
Cr-Commit-Position: refs/heads/master@{#9735}
This reverts commit 0a2955f227666efd87b2a303a69c083ef801c528.
Revert "In the past, P2PPortAllocator.enable_multiple_routes is the indicator whether we should bind to the any address. It's easy to translate that into a port allocator flag in P2PPortAllocator's ctor. Going forward, we have to depend on an asynchronous permission check to determine whether gathering local address is allowed or not, hence the current way of passing it through constructor approach won't work any more. The asynchronous check will trigger SignalNetowrksChanged so we could only check that inside DoAllocate."
This reverts commit ba9ab4cd8d2e8fbc068dc36b5e6f6331d7deeccf.
TBR=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1288843003 .
Cr-Commit-Position: refs/heads/master@{#9729}
Adapter enumeration disable should be a concept from Network. Network will be hooked up with media permission (mic/camera) to check whether gathering local address is allowed.
BUG=crbug.com/520101
R=juberti@webrtc.org, pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1284113003 .
Cr-Commit-Position: refs/heads/master@{#9728}
> Ensure only temporary IPv6 address is selected as the best IP.
>
> The current logic of IPv6 selection could still have a small chance for non-temporary address to be selected for candidate. The scenario is that when there is no non-deprecated temporary IP, the global ones could be selected.
>
> Global ones don't necessarily carry MAC. However, instead of comparing whether it has the MAC in it (sometimes 5 out of 6 elements from a MAC are the same, only one diffs), we should just err on the safe side.
>
> BUG=4348
> R=juberti@webrtc.org, pthatcher@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/38289004TBR=guoweis@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/38319004
Cr-Commit-Position: refs/heads/master@{#8534}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8534 4adac7df-926f-26a2-2b94-8c16560cd09d
The current logic of IPv6 selection could still have a small chance for non-temporary address to be selected for candidate. The scenario is that when there is no non-deprecated temporary IP, the global ones could be selected.
Global ones don't necessarily carry MAC. However, instead of comparing whether it has the MAC in it (sometimes 5 out of 6 elements from a MAC are the same, only one diffs), we should just err on the safe side.
BUG=4348
R=juberti@webrtc.org, pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/38289004
Cr-Commit-Position: refs/heads/master@{#8532}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8532 4adac7df-926f-26a2-2b94-8c16560cd09d
PeerConnectionTest.java currently works, but only on a device with
network interfaces up. This is not a problem for desktop, but it is a
problem when running on Android devices since the devices in the lab
generally don't have network (due to the chaotic radio environment in
the device labs, devices are simply kept in flight mode).
The test does work if one modifies this line in the file
webrtc/base/network.cc:
bool ignored = ((cursor->ifa_flags & IFF_LOOPBACK) ||
IsIgnoredNetwork(*network));
If we remove the IFF_LOOPBACK clause, the test starts working on
an Android device in flight mode. This is nice - we're running the
call and packets interact with the OS network stack, which is good
for this end-to-end test. We can't just remove the clause though since
having loopback is undesirable for everyone except the test (right)?
so we need to make this behavior configurable.
This CL takes a stab at a complete solution where we pass a boolean
all the way through the Java PeerConnectionFactory down to the
BasicNetworkManager. This comes as a heavy price in interface
changes though. It's pretty out of proportion, but fundamentally we
need some way of telling the network manager that it is on Android
and in test mode. Passing the boolean all the way through is one way.
Another way might be to put the loopback filter behind an ifdef and
link a custom libjingle_peerconnection.so with the test. That is hacky
but doesn't pollute the interfaces. Not sure how to solve that in GYP
but it could mean some duplication between the production and
test .so files.
It would have been perfect to use flags here, but then we need to
hook up gflags parsing to some main() somewhere to make sure the
flag gets parsed, and make sure to pass that flag in our tests.
I'm not sure how that can be done.
Making the loopback filtering conditional is exactly how we solved the
equivalent problem in content_browsertests in Chrome, and it worked
great.
That's all I could think of.
BUG=4181
R=perkj@webrtc.org, pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/36769004
Cr-Commit-Position: refs/heads/master@{#8344}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8344 4adac7df-926f-26a2-2b94-8c16560cd09d
Currently, in ipc_network_manager.cc, the UMA WebRTC.PeerConnection.IPv4Interfaces and its IPv6
counter part counts the addresses, instead of the interfaces as when
chromium delivers available networks to WebRTC, each address is wrapped
inside an individual network object.
The plan is to replace the current MergeNetworkList with the new one once it's rolled into chromium.
BUG=
R=pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/36779004
Cr-Commit-Position: refs/heads/master@{#8188}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8188 4adac7df-926f-26a2-2b94-8c16560cd09d
1) return the first global temporary and non-deprecrated ones.
2) if #1 not available, return global one.
3) if #2 not available, use ULA ipv6 as last resort.
ULA stands for unique local address. They are only useful in a private
WebRTC deployment. More detail: http://en.wikipedia.org/wiki/Unique_local_address
BUG=3808
At this point, rule #3 actually won't happen at current
implementation. The reason being that ULA address starting with 0xfc 0r 0xfd will be grouped into its own Network. The result of that is WebRTC will have one extra Network to generate candidates but the lack of rule #3 shouldn't prevent turning on IPv6 since ULA should only be tried in a close deployment anyway.
R=jiayl@webrtc.org
Committed: https://code.google.com/p/webrtc/source/detail?r=7200
Review URL: https://webrtc-codereview.appspot.com/31369004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7201 4adac7df-926f-26a2-2b94-8c16560cd09d
1) return the first global temporary and non-deprecrated ones.
2) if #1 not available, return global one.
3) if #2 not available, use ULA ipv6 as last resort.
ULA stands for unique local address. They are only useful in a private
WebRTC deployment. More detail: http://en.wikipedia.org/wiki/Unique_local_address
BUG=3808
At this point, rule #3 actually won't happen at current
implementation. The reason being that ULA address starting with 0xfc 0r 0xfd will be grouped into its own Network. The result of that is WebRTC will have one extra Network to generate candidates but the lack of rule #3 shouldn't prevent turning on IPv6 since ULA should only be tried in a close deployment anyway.
R=jiayl@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/31369004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7200 4adac7df-926f-26a2-2b94-8c16560cd09d