Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

ssdp: more checks

  • Loading branch information...
commit 24d8cf3391e276bc094030837d26885751ee35d2 1 parent 708f04c
Fedor Indutny authored September 01, 2012

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  lib/nat-upnp/ssdp.js
2  lib/nat-upnp/ssdp.js
@@ -177,6 +177,8 @@ Ssdp.prototype.parseResponse = function parseResponse(response, addr, remote) {
177 177
     return interfaces[route.interface].filter(function(addr) {
178 178
       return net.isIP(addr.address) === net.isIP(route.gateway) ||
179 179
              net.isIP(addr.address) === net.isIP(route.destination) ||
  180
+             net.isIP(addr.address) && net.isIP(route.netmask) &&
  181
+             net.isIP(route.gateway) &&
180 182
              ip.isEqual(ip.mask(addr.address, route.netmask),
181 183
                         ip.mask(route.gateway, route.netmask));
182 184
     }).map(function(addr) {

0 notes on commit 24d8cf3

Please sign in to comment.
Something went wrong with that request. Please try again.