lynckia / licode

Open Source Communication Provider based on WebRTC and Cloud technologies
http://lynckia.com/licode
MIT License
3.09k stars 1.02k forks source link

Support for IPv6 #629

Open menelike opened 7 years ago

menelike commented 7 years ago

I could not find any specs on IPv6, reading the code and the example config there seems to be no option to configure IPv6.

Does a IPv6 solution exist or is it planned?

Thanks a lot!

waqasburney commented 7 years ago

Is this issue addressed? We are facing an issue where we are unable to get video to work for us on iPhone (using the erizo-IOS client) when connecting using T-Mobile's network. This started happening after the 28.3 carrier update and I suppose it is being caused by the ipv6 only implementation that T-Mobile uses.

menelike commented 7 years ago

@waqasburney No it wasn't, just closed this as we found a workaround (won't work for pure ipv6).

I'm afraid that this won't be easy.

waqasburney commented 7 years ago

@menelike Can you please share the details on the workaround you implemented. Might fix our issue as well.

marklawlor commented 7 years ago

@menelike Can you please share your work around?

marklawlor commented 7 years ago

@waqasburney Are you getting any errors with LibNice when trying to use IPv6?

On a IPv4 connection, LibNice outputs this debug message:

2|erizoAge | 2017-06-22 02:10:25,099 - DEBUG [0x7f8b72061780] LibNiceConnection - id: 548114304409542800, message: adding relay or srflx remote candidate, hostType: 1, hostAddress: 14.203.102.70, hostPort: 63371, rAddress: 192.168.16.55, rPort: 63371
2|erizoAge | [erizo-2bab5c17-5e92-b1c0-4b28-ac16b625105f] 2017-06-22 02:10:25,107 - DEBUG [0x7f8b1c7f8700] LibNiceConnection - id: 548114304409542800, message: new ice component state, newState: 2, transportName: video, componentId 1, iceComponents: 1

But on a IPv6 connection, this debug message doesn't appear to have a port which results in LibNice throwing a critical error

2|erizoAge | 2017-06-22 02:00:35,244 - DEBUG [0x7f529203b780] LibNiceConnection - id: 230972141663969660, message: adding relay or srflx remote candidate, hostType: 1, hostAddress: 14.203.102.70, hostPort: 42771, rAddress: 2001, rPort: 0
2|erizoAge | [erizo-474cf9b9-46f5-2394-5ea6-bd9f7ec553c8]
2|erizoAge | (process:6992): libnice-CRITICAL **: file address.c: line 166 (nice_address_set_port): should not be reached

I'm guessing that somewhere Licode is parsing the host and port by splitting on :. This will work for IPv4 but not for IPv6

marklawlor commented 7 years ago

Quickly skimming over the code, it looks like the candidates are being split on the : character

https://github.com/lynckia/licode/blob/b595e39f53f957e4c2bd2c876bd03d93a1ba2f79/erizo/src/erizo/SdpInfo.cpp#L678-L679

Which causes the rAddress and rPort to be incorrectly parsed

https://github.com/lynckia/licode/blob/b595e39f53f957e4c2bd2c876bd03d93a1ba2f79/erizo/src/erizo/SdpInfo.cpp#L1103-L1107

Just to clarify, on my network Licode is hosted on an IP4 network, while my candidates are on an IP6 network. So I believe fixing the candidate message parsing will fix my specific issue, but I don't think it fixes the big picture of Licode's handling IP6 addresses

waqasburney commented 7 years ago

@marklawlor I did see Port 0 logs in the client side logs. I am following this up as a client side issue as well here but so far no fixes: https://bugs.chromium.org/p/webrtc/issues/detail?id=7703&q=ipv6&colspec=ID%20Pri%20M%20ReleaseBlock%20Component%20Status%20Owner%20Summary

We are hosting on AWS without ip6. Were you able to find a fix?

waqasburney commented 7 years ago

Has anyone else faced this issue and been able to create a fix that allows licode to work in a situation where a device is running on a pure ipv6 network?