Compare commits

...

4 Commits

4 changed files with 14 additions and 6 deletions

View File

@ -1,5 +1,12 @@
Revision history for Parse-Netstat-Search
0.2.2 2019-05-23/01:10
- Net::CIDR now treats ::/0 and 0.0.0.0/0 as the same.
t/search.t has been updated to reflect this.
0.2.1 2019-04-15/21:20
- Add missing depend Net::DNS. (SREZIC, #129196)
0.2.0 2019-04-15/02:30
- Minor typo correction(japh).
- Add PTR search support.

View File

@ -19,6 +19,7 @@ WriteMakefile(
'Net::CIDR' => '0',
'Parse::Netstat'=>'0.14',
'Error::Helper' => '1.0.0',
'Net::DNS' => '1.20',
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Parse-Netstat-Search-*' },

View File

@ -13,11 +13,11 @@ Parse::Netstat::Search - Searches the connection list in the results returned by
=head1 VERSION
Version 0.2.0
Version 0.2.2
=cut
our $VERSION = '0.2.0';
our $VERSION = '0.2.2';
=head1 SYNOPSIS

View File

@ -179,14 +179,14 @@ $search->set_ports;
ok( $#found eq '6', 'search, port+state reset') or diag('"'.$#found.'" number of returned connections for a empty search instead of "6"... failed to reset the ports and states');
# find all IPv6 addresses
$search->set_cidrs( ['::/0'] );
$search->set_cidrs( ['fe80::/32'] );
@found=$search->search($res);
ok( $#found eq '0', 'IPv6 CIDR search 1') or diag('"'.$#found.'" number of returned connections for ::/0 instead of "0"');
ok( $#found eq '0', 'IPv6 CIDR search 1') or diag('"'.$#found.'" number of returned connections for fe80::/32 instead of "0"');
ok( $found[0]->{local_pp} eq 'lo0', 'IPv6 % removal test') or diag('"local_pp" not defined for removed % section of IPv6 address. "lo0" expected');
# test for future regrestions in mixed IPv4/6 CIDR lists
$search->set_cidrs( ['::/0','192.168.0.0/16'] );
$search->set_cidrs( ['fe80::/32','192.168.0.0/16'] );
@found=$search->search($res);
ok( $#found eq '1', 'Mixed IPv4/6 CIDR search 1') or diag('"'.$#found.'" number of returned connections for ::/0,192.168.0.0/16 instead of "1"');
ok( $#found eq '1', 'Mixed IPv4/6 CIDR search 1') or diag('"'.$#found.'" number of returned connections for fe80::/32,192.168.0.0/16 instead of "1"');
done_testing(23);