diff --git a/tools/runtime/sflow/goflow2-detect-ixp-bgp-sessions b/tools/runtime/sflow/goflow2-detect-ixp-bgp-sessions index aa62c2553..88e03abbb 100644 --- a/tools/runtime/sflow/goflow2-detect-ixp-bgp-sessions +++ b/tools/runtime/sflow/goflow2-detect-ixp-bgp-sessions @@ -115,7 +115,8 @@ while () { # $srcip, $dstip, $protocol, $tos, $ttl, # $srcport, $dstport, $tcpflags, $pktsize, $payloadsize, $samplerate) = @sample; - # SrcAddr,DstAddr,Etype,Proto,SrcPort,DstPort,TCPFlags + # SrcAddr,DstAddr,Etype,Proto,SrcPort,DstPort,TCPFlags,SamplerAddress,VlanId + # see https://github.com/netsampler/goflow2/blob/main/docs/protocols.md for more fields my $ethertype = $sample->{ Etype } my $srcip = $sample->{ SrcAddr } my $dstip = $sample->{ DstAddr } @@ -147,6 +148,8 @@ while () { } # we're also only interested in ip addresses that have a database match + my $agent = $sample->{ SamplerAddress } + my $vlan = $sample->{ VlanId } if ($ipmappings->{$ipprotocol}->{$srcip} && $ipmappings->{$ipprotocol}->{$dstip}) { print STDERR " database updated" if ($debug); if (!$sth->execute($ipmappings->{$ipprotocol}->{$srcip}, $ipmappings->{$ipprotocol}->{$dstip}, $ipprotocol, $vlan, $agent)) {