than just the normal definitions of localhost. So for 'normal' nodes with
one external interface, you DO NOT NEED TO DO ANY OF THIS.
2. Added CTY-3304 prefix data
+3. Fix Bad IP address system so that one can carry on as normal without
+ Net::CIDR::Lite (or libnet-cidr-lite-perl on debian based systems)
19Jan23=======================================================================
1. Introduce aliasing for localhost in DX Spots and outgoing PC92 A records
on login. There are two variables which can be set with the alias to use:
return (1, $self->msg('e5')) if $self->remotecmd;
# are we permitted?
return (1, $self->msg('e5')) if $self->priv < 6;
+return (1, q{Please install Net::CIDR::Lite or libnet-cidr-lite-perl to use this command}) unless $DXCIDR::active;
my @out;
return (1, $self->msg('e5')) if $self->remotecmd;
# are we permitted?
return (1, $self->msg('e5')) if $self->priv < 6;
+return (1, q{Please install Net::CIDR::Lite or libnet-cidr-lite-perl to use this command}) unless $DXCIDR::active;
+
my @out;
my @added;
my @in = split /\s+/, $line;
return (1, $self->msg('e5')) if $self->remotecmd;
# are we permitted?
return (1, $self->msg('e5')) if $self->priv < 6;
+return (1, q{Please install Net::CIDR::Lite or libnet-cidr-lite-perl to use this command}) unless $DXCIDR::active;
+
my @out;
my @added;
my @in = split /\s+/, $line;
my $maxlth = 0;
+my $width = $self->width // 80;
#$DB::single = 1;
my @list = map {my $s = $_; $s =~ s|/32$||; $maxlth = length $s if length $s > $maxlth; $s =~ /^1$/?undef:$s} DXCIDR::list();
my @l;
$maxlth //= 20;
-my $n = int (80/($maxlth+1));
+my $n = int ($width/($maxlth+1));
my $format = "\%-${maxlth}s " x $n;
chop $format;
push @out, sprintf $format, @l;
}
-push @out, "show/badip: " . scalar @list . " records found";
+push @out, "show/badip: " . scalar @out . " records found";
return (1, @out);
sub append
{
+ return 0 unless $active;
+
my $suffix = shift;
my @in = @_;
my @out;
sub add
{
+ return 0 unless $active;
my $count = 0;
for my $ip (@_) {
sub clean_prep
{
+ return unless $active;
+
if ($ipv4 && $count4) {
$ipv4->clean;
$ipv4->prep_find;
sub list
{
+ return () unless $active;
my @out;
push @out, $ipv4->list if $count4;
push @out, $ipv6->list if $count6;
sub reload
{
+ return 0 unless $active;
+
new();
my $count = 0;
sub new
{
+ return 0 unless $active;
+
$ipv4 = Net::CIDR::Lite->new;
$ipv6 = Net::CIDR::Lite->new;
$count4 = $count6 = 0;