Skip to content

Commit

Permalink
Use the correct MAC for inventory items
Browse files Browse the repository at this point in the history
  • Loading branch information
jrouzierinverse committed Sep 20, 2024
1 parent 74b3f75 commit 7344c24
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions go/cron/pfflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,18 @@ func (f *PfFlow) ToNetworkEvent() *NetworkEvent {
}

func (f *PfFlow) DestInventoryitem() *InventoryItem {
if f.BiFlow == 2 {
return macToInventoryitem(f.SrcMac)
}

return macToInventoryitem(f.DstMac)
}

func (f *PfFlow) SourceInventoryitem() *InventoryItem {
if f.BiFlow == 2 {
return macToInventoryitem(f.DstMac)
}

return macToInventoryitem(f.SrcMac)
}

Expand Down

0 comments on commit 7344c24

Please sign in to comment.