alminah / android-rcs-ims-stack

Automatically exported from code.google.com/p/android-rcs-ims-stack
0 stars 0 forks source link

IPv6 addresses may be used although not supported #166

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use a WiFi network which provides IPv6 and IPv4 addresses in parallel
2. randomly the IPv6 address will be used instead of the IPv4 address

What version of the product are you using? On what operating system?
seen in 2.5.10 (and older) and likely to be still in version 2.5.11

Please provide any additional information below.
Method AndroidNetworkFactory.getLocalIpAddress needs to check for an additional 
criteria: inetAddress instanceof Inet4Address

Original issue reported on code.google.com by RCSe...@googlemail.com on 11 Oct 2013 at 11:37

GoogleCodeExporter commented 9 years ago
If I well understand, the device has two addresses in parallel, one IPv4, on 
IPv6.
And the method getLocalIpAddress randomly returns one or other.

Forcing IPv4 is not good, because we can have only one IPv6 address, and the 
stack is compliant with IPv6.
We can maybe do something like this:
if no address before, take the first one.
If already a address before, check all addresses, take the same if available 
else take the first one.

Is that will solve your issue ?

Original comment by benoit.j...@gmail.com on 11 Oct 2013 at 12:51

GoogleCodeExporter commented 9 years ago
Hmm, well. I see the point if there's just IPv6 and no IPv4 it's not the best 
solution to ignore IPv6 addresses in general. From our perspective IPv4 should 
be the preferred address (at least our network only supports IPv4 right now).

Original comment by RCSe...@googlemail.com on 11 Oct 2013 at 1:42

GoogleCodeExporter commented 9 years ago
in fact, once the address is get, the stack use it until a connection event.
Maybe you want a setting to force IPv4.
It's not planned in our roadmap, but you can propose a contribution.

Original comment by benoit.j...@gmail.com on 11 Oct 2013 at 1:54

GoogleCodeExporter commented 9 years ago
I've changed the code in a way that the own, local IP address is determined by 
setting up a socket to the remote address (P-CSCF). By this we guarantee that 
always the right IP stack (IPv4 or IPv6) is selected which is matching to the 
remote party (please see proposal in Trello).

Original comment by RCSe...@googlemail.com on 6 Nov 2013 at 1:43