From 2c6b6cdb498f899b1aea42ff171dbba867a13212 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Tue, 9 Jul 2024 11:34:17 -0700 Subject: [PATCH] drop reason desc fix --- pkg/plugin/windows/pktmon/pktmon_plugin_windows.go | 2 +- pkg/utils/flow_utils.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/plugin/windows/pktmon/pktmon_plugin_windows.go b/pkg/plugin/windows/pktmon/pktmon_plugin_windows.go index 2b40a4493b0..91da5df4479 100644 --- a/pkg/plugin/windows/pktmon/pktmon_plugin_windows.go +++ b/pkg/plugin/windows/pktmon/pktmon_plugin_windows.go @@ -148,7 +148,7 @@ func (p *Plugin) Start(ctx context.Context) error { fl := event.GetFlow() if fl == nil { - p.l.Error("received nil flow") + p.l.Error("received nil flow, flow proto mismatch from client/server?") continue } diff --git a/pkg/utils/flow_utils.go b/pkg/utils/flow_utils.go index d8e6736ec12..194ae3e9c40 100644 --- a/pkg/utils/flow_utils.go +++ b/pkg/utils/flow_utils.go @@ -286,11 +286,12 @@ func AddDropReason(f *flow.Flow, meta *RetinaMetadata, dropReason uint32) { // Retina drop reasons are different from the drop reasons available in flow library. // We map the ones available in flow library to the ones available in Retina. // Rest are set to UNKNOWN. The details are added in the metadata. + f.DropReasonDesc = GetDropReasonDesc(meta.GetDropReason()) + f.EventType = &flow.CiliumEventType{ Type: int32(api.MessageTypeDrop), SubType: int32(f.GetDropReasonDesc()), // This is the drop reason. } - f.DropReasonDesc = GetDropReasonDesc(meta.GetDropReason()) } func DropReasonDescription(f *flow.Flow) string {