Skip to content

Commit

Permalink
drop reason desc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matmerr committed Jul 15, 2024
1 parent f95b9f7 commit e53c80a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/plugin/windows/pktmon/pktmon_plugin_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
1 change: 0 additions & 1 deletion pkg/utils/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func Retry(f func() error, retry int) (err error) {
return nil
}
t := int64(math.Pow(2, float64(i)))
fmt.Printf("failed with %v, retrying in %d seconds...\n", err, t)
time.Sleep(time.Duration(t) * time.Second)
}
return err
Expand Down
3 changes: 2 additions & 1 deletion pkg/utils/flow_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e53c80a

Please sign in to comment.