Make networkInterfaces work with dual stack environments, add ipIgnoreList config#28
Make networkInterfaces work with dual stack environments, add ipIgnoreList config#28prlanzarin wants to merge 2 commits intoKurento:masterfrom
Conversation
…eList This makes networkInterfaces dual stack compatible by removing the usage of nice_interfaces_get_ip_for_interface, which used ioctl and SIOCGIFADDR which are not AF_INET6 compatible This was done via glibc`s getifaddrs. The pitfall here is that, differently from ioctl, this fetches link local and private IPs from interfaces, which brought in the need of manually filtering link local addresses and the introduction of the ipIgnoreList configuration The ipIgnoreList config is a list of IP addresses (v4-6) to be ignored during the gathering phase. With that, you can prevent adding IPs from the desired interfaces you know are useless to libnice`s agent
|
Hi there, thanks for your Pull Request! A Kurento member needs to verify that this patch is reasonable to test. In case it is, they should write a comment with the phrase |
|
I'm up for a discussion about this approach, mainly regarding the addition of |
|
I believe (but have not tested) that dual stack support + If that's correct, then this PR should be closed/deprecated once Kurento picks up the libnice version that includes that MR. |
What is the current behavior you want to change?
Currently, the
networkInterfacesoption does not work with IPv6 addresses, making it useless in dual stack environments.This PR makes it dual stack compatible.
Fixes Kurento/bugtracker#500.
What is the new behavior provided by this change?
This makes networkInterfaces dual stack compatible by removing the usage of
nice_interfaces_get_ip_for_interface, which usedioctlandSIOCGIFADDR. The latter does not support (I think*)AF_INET6addresses, as explained by:The new appro was done via glibc's
getifaddrs(fully available from 2.3.3 onwards).The pitfall with this approach is that, differently from ioctl+SIOCGIFADDR, this fetches link local and private IPs from interfaces, which brought in the need of manually filtering link local addresses and the introduction of the new
ipIgnoreListconfiguration.From WebRtcEndpoint.conf.ini:
ipIgnoreListis only effective whennetworkInterfacesis set.How has this been tested?
networkInterfaces, withnetworkInterfaces, all environments: verified that it's working for single and dual stack envs;ipIgnoreList: tested by adding private range IPv4 and IPv6 addresses to my network interface.Verified that including them in the ignore list prevented them to be used in gathering (via webrtc-internals/about:webrtc).
Also tested single IPs and a list of IPs (both are supported);
Pending
Types of changes
Checklist