Merge branch 'fix_advertised_versions'
This commit is contained in:
commit
aa34dd2e45
|
@ -497,14 +497,6 @@ SendSSDPResponse(int s, const struct sockaddr * addr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef IGD_V2
|
|
||||||
#define IGD_VER 1
|
|
||||||
#define WANIPC_VER 1
|
|
||||||
#else
|
|
||||||
#define IGD_VER 2
|
|
||||||
#define WANIPC_VER 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
const char * s;
|
const char * s;
|
||||||
const int version;
|
const int version;
|
||||||
|
@ -512,23 +504,32 @@ static struct {
|
||||||
} const known_service_types[] =
|
} const known_service_types[] =
|
||||||
{
|
{
|
||||||
{"upnp:rootdevice", 0, uuidvalue_igd},
|
{"upnp:rootdevice", 0, uuidvalue_igd},
|
||||||
{"urn:schemas-upnp-org:device:InternetGatewayDevice:", IGD_VER, uuidvalue_igd},
|
#ifdef IGD_V2
|
||||||
|
{"urn:schemas-upnp-org:device:InternetGatewayDevice:", 2, uuidvalue_igd},
|
||||||
|
{"urn:schemas-upnp-org:device:WANConnectionDevice:", 2, uuidvalue_wcd},
|
||||||
|
{"urn:schemas-upnp-org:device:WANDevice:", 2, uuidvalue_wan},
|
||||||
|
{"urn:schemas-upnp-org:service:WANIPConnection:", 2, uuidvalue_wcd},
|
||||||
|
{"urn:schemas-upnp-org:service:DeviceProtection:", 1, uuidvalue_igd},
|
||||||
|
#ifdef ENABLE_6FC_SERVICE
|
||||||
|
{"urn:schemas-upnp-org:service:WANIPv6FirewallControl:", 1, uuidvalue_wcd},
|
||||||
|
#endif
|
||||||
|
#else /* IGD_V2 */
|
||||||
|
/* IGD v1 */
|
||||||
|
{"urn:schemas-upnp-org:device:InternetGatewayDevice:", 1, uuidvalue_igd},
|
||||||
{"urn:schemas-upnp-org:device:WANConnectionDevice:", 1, uuidvalue_wcd},
|
{"urn:schemas-upnp-org:device:WANConnectionDevice:", 1, uuidvalue_wcd},
|
||||||
{"urn:schemas-upnp-org:device:WANDevice:", 1, uuidvalue_wan},
|
{"urn:schemas-upnp-org:device:WANDevice:", 1, uuidvalue_wan},
|
||||||
|
{"urn:schemas-upnp-org:service:WANIPConnection:", 1, uuidvalue_wcd},
|
||||||
|
#endif /* IGD_V2 */
|
||||||
{"urn:schemas-upnp-org:service:WANCommonInterfaceConfig:", 1, uuidvalue_wan},
|
{"urn:schemas-upnp-org:service:WANCommonInterfaceConfig:", 1, uuidvalue_wan},
|
||||||
{"urn:schemas-upnp-org:service:WANIPConnection:", WANIPC_VER, uuidvalue_wcd},
|
|
||||||
#ifndef UPNP_STRICT
|
#ifndef UPNP_STRICT
|
||||||
/* We use WAN IP Connection, not PPP connection,
|
/* We use WAN IP Connection, not PPP connection,
|
||||||
* but buggy control points may try to use WanPPPConnection
|
* but buggy control points may try to use WanPPPConnection
|
||||||
* anyway */
|
* anyway */
|
||||||
{"urn:schemas-upnp-org:service:WANPPPConnection:", 1, uuidvalue_wcd},
|
{"urn:schemas-upnp-org:service:WANPPPConnection:", 1, uuidvalue_wcd},
|
||||||
#endif
|
#endif /* UPNP_STRICT */
|
||||||
#ifdef ENABLE_L3F_SERVICE
|
#ifdef ENABLE_L3F_SERVICE
|
||||||
{"urn:schemas-upnp-org:service:Layer3Forwarding:", 1, uuidvalue_igd},
|
{"urn:schemas-upnp-org:service:Layer3Forwarding:", 1, uuidvalue_igd},
|
||||||
#endif
|
#endif /* ENABLE_L3F_SERVICE */
|
||||||
#ifdef ENABLE_6FC_SERVICE
|
|
||||||
{"urn:schemas-upnp-org:service:WANIPv6FirewallControl:", 1, uuidvalue_wcd},
|
|
||||||
#endif
|
|
||||||
/* we might want to support urn:schemas-wifialliance-org:device:WFADevice:1
|
/* we might want to support urn:schemas-wifialliance-org:device:WFADevice:1
|
||||||
* urn:schemas-wifialliance-org:device:WFADevice:1
|
* urn:schemas-wifialliance-org:device:WFADevice:1
|
||||||
* in the future */
|
* in the future */
|
||||||
|
|
|
@ -1187,7 +1187,11 @@ GetDefaultConnectionService(struct upnphttp * h, const char * action, const char
|
||||||
static const char resp[] =
|
static const char resp[] =
|
||||||
"<u:%sResponse "
|
"<u:%sResponse "
|
||||||
"xmlns:u=\"%s\">"
|
"xmlns:u=\"%s\">"
|
||||||
|
#ifdef IGD_V2
|
||||||
|
"<NewDefaultConnectionService>%s:WANConnectionDevice:2,"
|
||||||
|
#else
|
||||||
"<NewDefaultConnectionService>%s:WANConnectionDevice:1,"
|
"<NewDefaultConnectionService>%s:WANConnectionDevice:1,"
|
||||||
|
#endif
|
||||||
SERVICE_ID_WANIPC "</NewDefaultConnectionService>"
|
SERVICE_ID_WANIPC "</NewDefaultConnectionService>"
|
||||||
"</u:%sResponse>";
|
"</u:%sResponse>";
|
||||||
/* example from UPnP_IGD_Layer3Forwarding 1.0.pdf :
|
/* example from UPnP_IGD_Layer3Forwarding 1.0.pdf :
|
||||||
|
|
Loading…
Reference in New Issue