This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
Make networkInterfaces work with dual stack environments, add ipIgnoreList config #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the current behavior you want to change?
Currently, the
networkInterfaces
option 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 usedioctl
andSIOCGIFADDR
. The latter does not support (I think*)AF_INET6
addresses, 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
ipIgnoreList
configuration.From WebRtcEndpoint.conf.ini:
ipIgnoreList
is only effective whennetworkInterfaces
is 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