diff --git a/goflow.go b/goflow.go index 85dad55..5a10605 100644 --- a/goflow.go +++ b/goflow.go @@ -28,7 +28,7 @@ import ( "bytes" ) -const AppVersion = "GoFlow v2.0.0" +const AppVersion = "GoFlow v2.0.1" var ( FEnable = flag.Bool("netflow", true, "Enable NetFlow") diff --git a/producer/producer_nf.go b/producer/producer_nf.go index fc0519c..fa1529a 100644 --- a/producer/producer_nf.go +++ b/producer/producer_nf.go @@ -292,9 +292,17 @@ func SearchNetFlowOptionDataSets(dataFlowSet []netflow.OptionsDataFlowSet) (uint var found bool for _, dataFlowSetItem := range dataFlowSet { for _, record := range dataFlowSetItem.Records { - b := NetFlowPopulate(record.OptionsValues, 34, &samplingRate) - if b { // cannot do found |= NetFlow... - found = b + b := NetFlowPopulate(record.OptionsValues, 305, &samplingRate) + if b { + return samplingRate, b + } + b = NetFlowPopulate(record.OptionsValues, 50, &samplingRate) + if b { + return samplingRate, b + } + b = NetFlowPopulate(record.OptionsValues, 34, &samplingRate) + if b { + return samplingRate, b } } }