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' ]; }; 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;