# $Id: cidrexpand,v 8.8 2006-08-07 17:18:37 ca Exp $
#
# v 0.4
#
# 17 July 2000 Derek J. Balling (dredd@megacity.org)
#
# notation.
#
# If you have two overlapping CIDR blocks with conflicting actions
# e.g. 10.2.3.128/25 REJECT and 10.2.3.143 ACCEPT
# make sure that the exceptions to the more general block are specified
# later in the access_db.
#
# the -r flag to makemap will make it "do the right thing"
#
# Modifications
# -------------
# 26 Jul 2001 Derek Balling (dredd@megacity.org)
# Now uses Net::CIDR because it makes life a lot easier.
#
# 5 Nov 2002 Richard Rognlie (richard@sendmail.com)
# Added code to deal with the prefix tags that may now be included in
# the access_db
#
# Added clarification in the notes for what to do if you have
# exceptions to a larger CIDR block.
#
# 26 Jul 2006 Richard Rognlie (richard@sendmail.com>
# Added code to strip "comments" (anything after a non-escaped #)
# # characters after a \ or within quotes (single and double) are
# left intact.
#
# e.g.
# From:1.2.3.4 550 Die spammer # spammed us 2006.07.26
# becomes
# From:1.2.3.4 550 Die spammer
#
# 3 August 2006
#
# Corrected a bug to have it handle the special case of "0.0.0.0/0"
# since Net::CIDR doesn't handle it properly.
#
# usage:
#
#
# Report bugs to: <dredd@megacity.org>
#
use strict;
getopts('ct:');
my $spaceregex = '\s+';
if ($opt_t)
{
}
while (<>)
{
{
# print "checking...\n";
my $i;
{
{
$i++;
next;
}
elsif ($qtype eq '' && $ch eq '#')
{
last;
}
{
}
{
}
}
}
{
print "$_\n";
}
else
{
{
}
}
}
sub expand_network
{
my $left_input = shift;
{
while ($#parts < 3)
{
}
}
return @rc;
}