From 798676823da80374c511e61fc5c3b91220da7f10 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Sun, 28 Jun 2020 13:01:54 +0100 Subject: [PATCH] fix ipv4 addresses masquerading as ipv6 --- perl/RBN.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/perl/RBN.pm b/perl/RBN.pm index 91d1a9fd..6773118f 100644 --- a/perl/RBN.pm +++ b/perl/RBN.pm @@ -37,7 +37,7 @@ our $beacontime = 5*60; # same as minspottime, but for beacons (and shorter) our $dwelltime = 6; # the amount of time to wait for duplicates before issuing # a spot to the user (no doubt waiting with bated breath). -our $filterdef = $Spot::filterdef; # we use the same filter as the Spot system. Can't think why. +our $filterdef = $Spot::filterdef; # we use the same filter as the Spot system. Can't think why :-). sub new { @@ -58,6 +58,8 @@ sub new $self->{minspottime} = $minspottime; $self->{beacontime} = $beacontime; $self->{showstats} = 0; + $self->{pingint} = 0; + $self->{nopings} = 0; return $self; } @@ -84,7 +86,10 @@ sub start ($h) = $line =~ /host=([\da..fA..F:]+)/; $line =~ s/\s*host=[\da..fA..F:]+// if $h; } - $self->{hostname} = $h if $h; + if ($h) { + $h =~ s/^::ffff://; + $self->{hostname} = $h; + } } $self->{width} = 80 unless $self->{width} && $self->{width} > 80; $self->{consort} = $line; # save the connection type -- 2.43.0