diff --git a/IP.pm b/IP.pm index 4822f28..e0cd544 100644 --- a/IP.pm +++ b/IP.pm @@ -426,6 +426,7 @@ my @low; my @up; return ([],[]) if $_[0] == $_[1]; + return ([$_[0]],[]) unless $_[1]->within($_[0]); my ($s1,$s2) = $_[0]->split($_[0]->masklen+1); while ($s1 != $_[1] && $s2 != $_[1]) { if ($_[1]->within($s1)) {