Skip to content

UPnP fixes

Sebastian Krzyszkowiak requested to merge dos/libktorrent:soapaction into master

With these changes, KTorrent finally manages to handle port forwarding with my ISP's router.


upnprouter: Fix SOAPAction header in UPnP requests

The header's value must be enclosed by quotation marks: https://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383528

Some gateways respond with 400 Bad Request when this requirement isn't met.

Fixes: d671f62f ("Use QNetworkAccessManager to send and receive UPnP requests.")

upnprouter: Send NewRemoteHost in forward and undoForward

NewRemoteHost is a required argument for both AddPortMapping and DeletePortMapping in both UPnP WANIPConnection:1 and TR-064. To specify a wildcard value, an empty string is used.

Omitting the tag makes some gateways respond with 402 Invalid Args faultcode.

Fixes: bb2d9583 ("Add support for TR-064 IGD's")

Merge request reports