Comparing version 0.2.7 to 0.2.8
@@ -164,9 +164,11 @@ var dgram = require('dgram'), | ||
// Remove /24 part from address | ||
route.destination = route.destination.replace(/\/\d+$/, ''); | ||
if (route.destination) { | ||
route.destination = route.destination.replace(/\/\d+$/, ''); | ||
} | ||
if (route.destination && route.netmask) { | ||
if (net.isIP(route.destination) && route.netmask) { | ||
return ip.isEqual(ip.mask(remote.address, route.netmask), | ||
ip.mask(route.destination, route.netmask)); | ||
} | ||
if (route.destination) { | ||
if (net.isIP(route.destination)) { | ||
return ip.isEqual(remote.address, route.destination) || | ||
@@ -173,0 +175,0 @@ ip.isEqual(route.destination, '::'); |
{ | ||
"name": "nat-upnp", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"main": "lib/nat-upnp", | ||
@@ -5,0 +5,0 @@ "author": "Fedor Indutny <fedor@indutny.com>", |
19724
549