UPnP fix
- it looks like some UPnP server implementations consider NewRemoteHost to be a mandatory tag
This commit is contained in:
parent
0689525d61
commit
6add48e036
|
@ -110,6 +110,7 @@ class Router:
|
||||||
def AddPortMapping(self, externalPort, internalPort, internalClient, protocol, description, leaseDuration = 0, enabled = 1):
|
def AddPortMapping(self, externalPort, internalPort, internalClient, protocol, description, leaseDuration = 0, enabled = 1):
|
||||||
from debug import logger
|
from debug import logger
|
||||||
resp = self.soapRequest(self.upnp_schema + ':1', 'AddPortMapping', [
|
resp = self.soapRequest(self.upnp_schema + ':1', 'AddPortMapping', [
|
||||||
|
('NewRemoteHost', ''),
|
||||||
('NewExternalPort', str(externalPort)),
|
('NewExternalPort', str(externalPort)),
|
||||||
('NewProtocol', protocol),
|
('NewProtocol', protocol),
|
||||||
('NewInternalPort', str(internalPort)),
|
('NewInternalPort', str(internalPort)),
|
||||||
|
@ -125,6 +126,7 @@ class Router:
|
||||||
def DeletePortMapping(self, externalPort, protocol):
|
def DeletePortMapping(self, externalPort, protocol):
|
||||||
from debug import logger
|
from debug import logger
|
||||||
resp = self.soapRequest(self.upnp_schema + ':1', 'DeletePortMapping', [
|
resp = self.soapRequest(self.upnp_schema + ':1', 'DeletePortMapping', [
|
||||||
|
('NewRemoteHost', ''),
|
||||||
('NewExternalPort', str(externalPort)),
|
('NewExternalPort', str(externalPort)),
|
||||||
('NewProtocol', protocol),
|
('NewProtocol', protocol),
|
||||||
])
|
])
|
||||||
|
|
Reference in New Issue
Block a user