From 26efb54548ee698aff62dcaeceb2db2c077ea5ab Mon Sep 17 00:00:00 2001 From: "Sixia \"Leask\" Huang" Date: Mon, 27 Feb 2023 23:40:09 -0500 Subject: [PATCH 1/2] adding urn:schemas-upnp-org:service:WANIPConnection:2 --- lib/nat-upnp/device.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/nat-upnp/device.js b/lib/nat-upnp/device.js index 8a1b020..ec18909 100644 --- a/lib/nat-upnp/device.js +++ b/lib/nat-upnp/device.js @@ -10,6 +10,7 @@ function Device(url) { this.description = url; this.services = [ 'urn:schemas-upnp-org:service:WANIPConnection:1', + 'urn:schemas-upnp-org:service:WANIPConnection:2', 'urn:schemas-upnp-org:service:WANPPPConnection:1' ]; }; From b7ff3e75bd6bd26886bdbb7746fa74070922cf9d Mon Sep 17 00:00:00 2001 From: Leask Wong Date: Wed, 8 Mar 2023 12:00:55 -0500 Subject: [PATCH 2/2] handled https://github.com/indutny/node-nat-upnp/issues/33 --- lib/nat-upnp/ssdp.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/nat-upnp/ssdp.js b/lib/nat-upnp/ssdp.js index 8475d65..0d6132e 100644 --- a/lib/nat-upnp/ssdp.js +++ b/lib/nat-upnp/ssdp.js @@ -96,9 +96,9 @@ Ssdp.prototype.search = function search(device, promise) { return promise; }; -Ssdp.prototype.createSocket = function createSocket(interface) { +Ssdp.prototype.createSocket = function createSocket(conn) { var self = this; - var socket = dgram.createSocket(interface.family === 'IPv4' ? + var socket = dgram.createSocket(conn.family === 'IPv4' ? 'udp4' : 'udp6'); socket.on('message', function (message, info) { @@ -132,8 +132,8 @@ Ssdp.prototype.createSocket = function createSocket(interface) { onready(); }); - socket.address = interface.address; - socket.bind(self._sourcePort, interface.address); + socket.address = conn.address; + socket.bind(self._sourcePort, conn.address); }); return socket;