allow /32 etc in is_ipaddr
[spider.git] / perl / DXUtil.pm
index 286f544b1bc017c00d612df26a927f893a85338b..d23c27cfa5e3d73e4d3c21fae04aef16d6d08a9e 100644 (file)
@@ -457,6 +457,7 @@ sub is_latlong
 # is it an ip address?
 sub is_ipaddr
 {
+       $_[0] =~ s|/\d+$||;
        if ($ptonok) {
                if ($_[0] =~ /:/) {
                        if (inet_pton(AF_INET6, $_[0])) {