Commit aa119d78 authored by Stepan Salenikovich's avatar Stepan Salenikovich

upnp: do not use IPv6

IPv6 is enabled in libupnp which ships with ubuntu 16.04, but the
ipv6 init fails.

Change-Id: I94a652b4b6270a4b50e237e103445df9c23f3abe
Tuleap: #442
parent ac3dddec
......@@ -120,14 +120,16 @@ UPnPContext::UPnPContext()
* by selecting the IP
*/
#ifdef UPNP_ENABLE_IPV6
/* TODO: test if ipv6 support works properly, eg: what if router doesn't support ipv6? */
RING_DBG("UPnP: using IPv6");
upnp_err = UpnpInit2(0, 0);
#else
#ifdef UPNP_ENABLE_IPV6
RING_DBG("UPnP: IPv6 support enabled, but we will use IPv4");
/* IPv6 version seems to fail on some systems with:
* UPNP_E_SOCKET_BIND: An error occurred binding a socket. */
/* TODO: figure out why ipv6 version doesn't work */
// upnp_err = UpnpInit2(0, 0);
#endif
RING_DBG("UPnP: using IPv4");
upnp_err = UpnpInit(0, 0);
#endif
if ( upnp_err != UPNP_E_SUCCESS ) {
UpnpFinish();
throw std::runtime_error(UpnpGetErrorMessage(upnp_err));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment