Skip to content
Snippets Groups Projects
Commit aa119d78 authored by Stepan Salenikovich's avatar Stepan Salenikovich
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -121,13 +121,15 @@ UPnPContext::UPnPContext() ...@@ -121,13 +121,15 @@ UPnPContext::UPnPContext()
*/ */
#ifdef UPNP_ENABLE_IPV6 #ifdef UPNP_ENABLE_IPV6
/* TODO: test if ipv6 support works properly, eg: what if router doesn't support ipv6? */ RING_DBG("UPnP: IPv6 support enabled, but we will use IPv4");
RING_DBG("UPnP: using IPv6"); /* IPv6 version seems to fail on some systems with:
upnp_err = UpnpInit2(0, 0); * UPNP_E_SOCKET_BIND: An error occurred binding a socket. */
#else /* TODO: figure out why ipv6 version doesn't work */
// upnp_err = UpnpInit2(0, 0);
#endif
RING_DBG("UPnP: using IPv4"); RING_DBG("UPnP: using IPv4");
upnp_err = UpnpInit(0, 0); upnp_err = UpnpInit(0, 0);
#endif
if ( upnp_err != UPNP_E_SUCCESS ) { if ( upnp_err != UPNP_E_SUCCESS ) {
UpnpFinish(); UpnpFinish();
throw std::runtime_error(UpnpGetErrorMessage(upnp_err)); throw std::runtime_error(UpnpGetErrorMessage(upnp_err));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment