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

Fix UPnP IGD search and port mapping deletion #4094

Merged
merged 1 commit into from
Oct 2, 2024
Merged

Fix UPnP IGD search and port mapping deletion #4094

merged 1 commit into from
Oct 2, 2024

Conversation

sauwming
Copy link
Member

@sauwming sauwming commented Oct 2, 2024

It is reported that freeing the XML document returned by UpnpActionComplete_get_ActionResult() will cause crash.

Note that I am unable to reproduce the issue on my Mac (even under Address Sanitizer), but according to the sample:
https://github.com/pupnp/pupnp/blob/branch-1.14.x/upnp/sample/common/sample_util.c#L447
it seems to be unnecessary to call ixmlDocument_free().

Another fix in this PR is to remove the version matching for the IGD.

 * Devices specified by UPnP vendors, must begin with urn:,
 * followed by an ICANN domain name owned by the vendor, followed by :device:,
 * followed by a device type suffix, colon, and an integer version, i.e.,
 * urn:domain-name:device:deviceType:v.

In my newest router device, it broadcasts that it uses version 2: urn:schemas-upnp-org:device:InternetGatewayDevice:2.

@sauwming sauwming merged commit 7b93726 into master Oct 2, 2024
36 checks passed
@sauwming sauwming deleted the upnp-fix branch October 2, 2024 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants