Commit bd228622 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Make sure variables are initilized, fixed some IPv6 issues

- Robert Anderson <randerson@lbsd.net>
parent fc922eac
......@@ -285,7 +285,7 @@ sub is_valid
}
# Does the IP address have more than one '::' pattern ?
my $count;
my $count = 0;
while ($ip =~ /::/g) {
$count++;
}
......@@ -443,7 +443,7 @@ sub _clean_ip
}
# Does the IP address have more than one '::' pattern ?
my $count;
my $count = 0;
while ($self->{'raw_ip'} =~ /::/g) {
$count++;
}
......@@ -453,7 +453,7 @@ sub _clean_ip
}
# Expand address
my $tempIP;
my $tempIP = $self->{'raw_ip'};
if ($numOctets < 8) {
# If there is no :: return 0
......@@ -473,8 +473,6 @@ sub _clean_ip
}
my $octets = join(':', @missingOctets);
$tempIP = $self->{'raw_ip'};
# Replace ::
$tempIP =~ s/::/:$octets:/g;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment