Skip to content
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

Consider workaround for Linksys UPNP bugs #12

Open
mikehearn opened this issue Nov 22, 2014 · 0 comments
Open

Consider workaround for Linksys UPNP bugs #12

mikehearn opened this issue Nov 22, 2014 · 0 comments

Comments

@mikehearn
Copy link

As documented here:

http://www.upnp-hacks.org/annoyances.html

Linksys devices (very common) have an unbelievable and infuriating bug. They can support a max of 32 UPnP mappings, but the table is persisted across device reboots. This means that over time Linksys routers decay and rot because their UPnP table fills up with dead mappings created by crashed programs or devices. Eventually you hit the 32 entry limit. There is no way to clean the table or even know this has happened via the web UI and best of all .... wait for it .... the device continues to accept new mapping requests without serving any errors. It just silently fails to do what it claims it's doing.

The Java PortMapper tool that uses weupnp can be used to clean this situation by removing dead mappings. WeUPnP could theoretically have a workaround for this stupidity by detecting the combination of:

  • Linksys router
  • Exactly 32 mappings in the table

If it detects this case, then it could scan to find closed ports and remove the mappings for them, thus unbreaking the device!

I know it's pretty stupid and ugly, but it'd help make UPnP more reliable for apps using this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant