mirror of
https://github.com/manuelkasper/AS-Stats.git
synced 2025-02-20 11:44:12 +08:00
fix bug: GatewayIpVersionNextHopRouter is 255.255.255.255 sometimes
This commit is contained in:
parent
ee24f5cced
commit
705e1687ff
6
bin/asstatd.pl
Normal file → Executable file
6
bin/asstatd.pl
Normal file → Executable file
@ -11,6 +11,7 @@ use IO::Select;
|
||||
use IO::Socket;
|
||||
use RRDs;
|
||||
use Getopt::Std;
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
|
||||
my %knownlinks;
|
||||
my %link_samplingrates;
|
||||
@ -515,9 +516,10 @@ sub parse_sflow {
|
||||
$ipversion = 6;
|
||||
} else {
|
||||
$noctets = $sFlowSample->{'HeaderFrameLength'} - 14;
|
||||
|
||||
|
||||
# make one more attempt at figuring out the IP version
|
||||
if ((defined($sFlowSample->{'GatewayIpVersionNextHopRouter'}) &&
|
||||
if ((defined($sFlowSample->{'GatewayIpVersionNextHopRouter'}) &&
|
||||
looks_like_number($sFlowSample->{'GatewayIpVersionNextHopRouter'}) &&
|
||||
$sFlowSample->{'GatewayIpVersionNextHopRouter'} == 2) ||
|
||||
(defined($sFlowSample->{'HeaderType'}) && $sFlowSample->{'HeaderType'} eq '86dd')) {
|
||||
$ipversion = 6;
|
||||
|
Loading…
x
Reference in New Issue
Block a user