CC: | "Andrew D. Clark" <adc [...] umn.edu>, Scott Bertilson <scott [...] nts.umn.edu> |
Subject: | inconsistent use of 'protocol' method in PIX::Accesslist and PIX::Object |
Date: | Wed, 24 Oct 2007 10:59:48 -0500 |
To: | bug-PIX-Walker [...] rt.cpan.org |
From: | Tim Peiffer <peiffer [...] umn.edu> |
Bug Report: There is an inconsistent use of 'protocol' method in
PIX::Accesslist and PIX::Object
Distribution: PIX-Walker-1.03
Perl Version: 5.8.8
Operating Systems: RedHat EL4.0 2.6.9-55.0.9.ELsmp and also Fedora Core5
kernel 2.6.20-1.2320.fc5
The man page example for PIX::Walker indicates that the way to match is
using the 'protocol' attribute.
foreach my $line ($acl->lines) {
if ($line->match(
source => ’10.0.1.100’,
dest => ’192.168.1.3’,
port => ’80’,
protocol => ’tcp’)) {
print "Matched ACL $acl->name ($acl->elements ACE)\n" if !$matched++;
print $line->print, "\n";
}
}
The module lib/PIX/Accesslist/Line.pm new() references 'proto' in the
constructor, while lib/PIX/Object/protocols.pm references 'protocols' in
each of the methods.
With an object group and acl for ICMP defined similar to below, your
example matches the ICMP filter (in error).
object-group icmp-type G_ICMP_ANY-IP
description ## Global Namespace * Permit ICMP Protocol Types From/To
"Any IPv4" To/From "Inside Vlan" ##
icmp-object echo-reply
icmp-object unreachable
icmp-object echo
icmp-object time-exceeded
access-list OUTSIDE_TO_INSIDE extended permit icmp object-group ANY
object-group ANY object-group G_ICMP_ANY-IP
Tim Peiffer
Network Support Engineer
Networking and Telecommunications Services
University of Minnesota / NorthernLights GigaPOP