New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime IGDv1 no longer working #539
Comments
please provide the faulty "/rootDesc.xml" |
It's not a problem with the "/rootDesc.xml" exactly, it's that Microsoft doesn't seem to be checking the version. Even though miniupnpd sets its version as 1, a MS client will still ask for a V2 only option if any such options are in the response. Since miniupnpd is actually a V2 server (in this case), it will respond to it normally (still setting its version to 1). On getting a valid response, the client will just ignore the server and not do UPNP. I've got a patch that works around this. I added in some code that checks the "User-Agent" string of a request, and sets a flag if it's a MS client. When that flag is set, it sets the version to 1 and sends only what a V1 server would send. This works, though I've only tested it with 2 Xbox Ones and Windows 10. I did not make this a pull request because there is probably a slightly better way of doing this - I couldn't figure out how to not send the V2 options out and had to duplicate the structures (removing the V2 options in them) to do so. But if you want, I can make this a pull request. |
@Darkshadow2 So when you detect the MS User-Agent you change the rootDesc.xml, right ? |
@Darkshadow2 regarding your patch, what are the differences between ms_rootDesc and the regular rootDesc ? |
I changed the rootDesc.xml and WANIPCn.xml. In ms_rootDesc, I think the only real change is it doesn't offer the DeviceProtection and WANIPv6FirewallControl services. For WANIPCn.xml, it only offers V1 options. The MS clients would always stop trying UPNP when it asked for 'GetListOfPortMappings' from WANIPCn.xml and got a valid response. I decided to only reply with what a V1 server would, and that seems to work. Possibly the changed rootDesc.xml isn't needed at all, only the changed WANIPCn.xml is. I didn't actually test that. So, here's rootDesc.xml, first normal then with a MS detected User-Agent:
...and WANIPCn.xml, normal first then with a MS client:
These are from my currently running |
@Darkshadow2 could you test my branch https://github.com/miniupnp/miniupnp/tree/issue-539 and see if that works with your MS clients ? I have not changed the rootDesc.xml, let me know if it is required as well. |
@Darkshadow2 It was not that hard to change rootDesc.xml too. |
Yes, this is working great. I knew there had to be a better way to do it than duplicating those structures. |
Please see openwrt/packages#14656
We have several reports compiling with IGDv1 is working but the runtime flag no longer is.
Sorry I didnt get a chance to look at this closer, will try to if I get some free time.
@miniupnp
The text was updated successfully, but these errors were encountered: