Prerequisites
Issue description
If networkInterfaces in WebRtcEndpoint.conf.ini is set, kurento picks only a signle IP of this interface.
Context
I try to accomplish IPv6 Support with the networkInterfaces setting as a filter.
How to reproduce?
(replace eth0 with your interface name)
- verify you have multiple IP addresses assigned to this interface with
$ ip addr show eth0
- set
networkInterfaces=eth0 in WebRtcEndpoint.conf.ini
- start kurento
- establish a WebRTC Connection
- check, which IP's are included in the candidates list
Expected & current behavior
I would expect that with the setting 'networkInterfaces' a connection should be possible over any IP of the mentioned interfaces, not just a single (random? first?) one.
Possible solution
kms_webrtc_base_connection_agent_add_net_addr currently uses nice_interfaces_get_ip_for_interface (gchar *interface_name) which responds with a single IP. It could use a different method for getting all IPs assigned to this interface and adding all of them to the nice_agent.
https://github.com/Kurento/kms-elements/blob/cbe7516a0e6f20ab380f4d530ad9162d5464547b/src/gst-plugins/webrtcendpoint/kmswebrtcbaseconnection.c#L220
/**
* Add new local IP address to NiceAgent instance.
*/
static void
kms_webrtc_base_connection_agent_add_net_addr (const gchar * net_name,
NiceAgent * agent)
{
NiceAddress *nice_address = nice_address_new ();
gchar *ip_address = nice_interfaces_get_ip_for_interface ((gchar *)net_name);
nice_address_set_from_string (nice_address, ip_address);
nice_agent_add_local_address (agent, nice_address);
GST_INFO_OBJECT (agent, "Added local address: %s", ip_address);
nice_address_free (nice_address);
g_free (ip_address);
}
INFO about Kurento Media Server
Prerequisites
I have read the SUPPORT document
I have checked the Troubleshooting Guide
I have tested with the latest version of Kurento
Issue description
If
networkInterfacesinWebRtcEndpoint.conf.iniis set, kurento picks only a signle IP of this interface.Context
I try to accomplish IPv6 Support with the
networkInterfacessetting as a filter.How to reproduce?
(replace
eth0with your interface name)$ ip addr show eth0networkInterfaces=eth0inWebRtcEndpoint.conf.iniExpected & current behavior
I would expect that with the setting 'networkInterfaces' a connection should be possible over any IP of the mentioned interfaces, not just a single (random? first?) one.
Possible solution
kms_webrtc_base_connection_agent_add_net_addrcurrently usesnice_interfaces_get_ip_for_interface (gchar *interface_name)which responds with a single IP. It could use a different method for getting all IPs assigned to this interface and adding all of them to the nice_agent.https://github.com/Kurento/kms-elements/blob/cbe7516a0e6f20ab380f4d530ad9162d5464547b/src/gst-plugins/webrtcendpoint/kmswebrtcbaseconnection.c#L220
INFO about Kurento Media Server