diff --git a/miniupnpd/genconfig.sh b/miniupnpd/genconfig.sh index a9f78f9..6555f5a 100755 --- a/miniupnpd/genconfig.sh +++ b/miniupnpd/genconfig.sh @@ -28,6 +28,7 @@ case "$argv" in echo "UPnP Version invalid in option $argv" exit 1 fi ;; + --disable-pppconn) DISABLEPPPCONN=1 ;; --help|-h) echo "Usage : $0 [options]" echo " --ipv6 enable IPv6" @@ -38,6 +39,7 @@ case "$argv" in echo " --pcp-peer enable PCP PEER operation" echo " --portinuse enable port in use check" echo " --uda-version=x.x set advertised UPnP version (default to ${UPNP_VERSION_MAJOR}.${UPNP_VERSION_MINOR})" + echo " --disable-pppconn disable WANPPPConnection" exit 1 ;; *) @@ -453,6 +455,15 @@ echo "/*#define HAS_DUMMY_SERVICE*/" >> ${CONFIGFILE} echo "#define ENABLE_L3F_SERVICE" >> ${CONFIGFILE} echo "" >> ${CONFIGFILE} +echo "/* define ADVERTISE_WANPPPCONN to allow buggy Control Point to use" >> ${CONFIGFILE} +echo " * WANPPPConnection instead of WANIPConnection. */" >> ${CONFIGFILE} +if [ -n "$STRICT" ] || [ -n "$DISABLEPPPCONN" ] ; then + echo "/*#define ADVERTISE_WANPPPCONN*/" >> ${CONFIGFILE} +else + echo "#define ADVERTISE_WANPPPCONN" >> ${CONFIGFILE} +fi +echo "" >> ${CONFIGFILE} + echo "/* Enable IP v6 support */" >> ${CONFIGFILE} if [ -n "$IPV6" ]; then echo "#define ENABLE_IPV6" >> ${CONFIGFILE} diff --git a/miniupnpd/minissdp.c b/miniupnpd/minissdp.c index b16c389..3beac50 100644 --- a/miniupnpd/minissdp.c +++ b/miniupnpd/minissdp.c @@ -521,12 +521,12 @@ static struct { {"urn:schemas-upnp-org:service:WANIPConnection:", 1, uuidvalue_wcd}, #endif /* IGD_V2 */ {"urn:schemas-upnp-org:service:WANCommonInterfaceConfig:", 1, uuidvalue_wan}, -#ifndef UPNP_STRICT +#ifdef ADVERTISE_WANPPPCONN /* We use WAN IP Connection, not PPP connection, * but buggy control points may try to use WanPPPConnection * anyway */ {"urn:schemas-upnp-org:service:WANPPPConnection:", 1, uuidvalue_wcd}, -#endif /* UPNP_STRICT */ +#endif /* ADVERTISE_WANPPPCONN */ #ifdef ENABLE_L3F_SERVICE {"urn:schemas-upnp-org:service:Layer3Forwarding:", 1, uuidvalue_igd}, #endif /* ENABLE_L3F_SERVICE */