* gena_subscribe(): Fix for IPV6 ULA/GUA issues.

Patch submitted by Ronan Menard.



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@574 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez 2010-08-21 21:53:09 +00:00
parent a7966b6597
commit 0e73448ea8
2 changed files with 10 additions and 1 deletions

View File

@ -2,6 +2,11 @@
Version 1.6.7 Version 1.6.7
******************************************************************************* *******************************************************************************
2010-08-21 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* gena_subscribe(): Fix for IPV6 ULA/GUA issues.
Patch submitted by Ronan Menard.
2010-08-21 Marcelo Jimenez <mroberto(at)users.sourceforge.net> 2010-08-21 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
* SOCKET ssdpSock6UlaGua: created variable for later use. * SOCKET ssdpSock6UlaGua: created variable for later use.

View File

@ -321,11 +321,15 @@ static int gena_subscribe(
} else { } else {
// subscribe // subscribe
if( dest_url.hostport.IPaddress.ss_family == AF_INET6 ) { if( dest_url.hostport.IPaddress.ss_family == AF_INET6 ) {
struct sockaddr_in6* DestAddr6 = (struct sockaddr_in6*)&dest_url.hostport.IPaddress;
return_code = http_MakeMessage( return_code = http_MakeMessage(
&request, 1, 1, &request, 1, 1,
"q" "sssdsc" "sc" "sscc", "q" "sssdsc" "sc" "sscc",
HTTPMETHOD_SUBSCRIBE, &dest_url, HTTPMETHOD_SUBSCRIBE, &dest_url,
"CALLBACK: <http://[", gIF_IPV6, "]:", LOCAL_PORT_V6, "/>", "CALLBACK: <http://[",
((IN6_IS_ADDR_LINKLOCAL(DestAddr6))||(strlen(gIF_IPV6_ULA_GUA) == 0 ))?
gIF_IPV6 : gIF_IPV6_ULA_GUA,
"]:", LOCAL_PORT_V6, "/>",
"NT: upnp:event", "NT: upnp:event",
"TIMEOUT: Second-", timeout_str ); "TIMEOUT: Second-", timeout_str );
} else { } else {