Skip to content
Snippets Groups Projects
Unverified Commit 0e3f5eac authored by Mario Macias's avatar Mario Macias Committed by GitHub
Browse files

Revert "NETOBSERV-755: ignore flow direction in deduplication (#74)" (#77)

This reverts commit 7c2b2929.
parent 7c2b2929
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,6 @@ func (c *deduperCache) isDupe(key *RecordKey) bool { ...@@ -67,7 +67,6 @@ func (c *deduperCache) isDupe(key *RecordKey) bool {
// zeroes fields from key that should be ignored from the flow comparison // zeroes fields from key that should be ignored from the flow comparison
rk.IFIndex = 0 rk.IFIndex = 0
rk.DataLink = DataLink{} rk.DataLink = DataLink{}
rk.Direction = 0
// If a flow has been accounted previously, whatever its interface was, // If a flow has been accounted previously, whatever its interface was,
// it updates the expiry time for that flow // it updates the expiry time for that flow
if ele, ok := c.ifaces[rk]; ok { if ele, ok := c.ifaces[rk]; ok {
......
...@@ -21,7 +21,7 @@ var ( ...@@ -21,7 +21,7 @@ var (
}, RecordMetrics: RecordMetrics{ }, RecordMetrics: RecordMetrics{
Packets: 2, Bytes: 456, Packets: 2, Bytes: 456,
}}, Interface: "123456789"} }}, Interface: "123456789"}
// another fow from 2 different interfaces and directions // another fow from 2 different interfaces
twoIf1 = &Record{RawRecord: RawRecord{RecordKey: RecordKey{ twoIf1 = &Record{RawRecord: RawRecord{RecordKey: RecordKey{
EthProtocol: 1, Direction: 1, Transport: Transport{SrcPort: 333, DstPort: 456}, EthProtocol: 1, Direction: 1, Transport: Transport{SrcPort: 333, DstPort: 456},
DataLink: DataLink{DstMac: MacAddr{0x1}, SrcMac: MacAddr{0x1}}, IFIndex: 1, DataLink: DataLink{DstMac: MacAddr{0x1}, SrcMac: MacAddr{0x1}}, IFIndex: 1,
...@@ -29,7 +29,7 @@ var ( ...@@ -29,7 +29,7 @@ var (
Packets: 2, Bytes: 456, Packets: 2, Bytes: 456,
}}, Interface: "eth0"} }}, Interface: "eth0"}
twoIf2 = &Record{RawRecord: RawRecord{RecordKey: RecordKey{ twoIf2 = &Record{RawRecord: RawRecord{RecordKey: RecordKey{
EthProtocol: 1, Direction: 0, Transport: Transport{SrcPort: 333, DstPort: 456}, EthProtocol: 1, Direction: 1, Transport: Transport{SrcPort: 333, DstPort: 456},
DataLink: DataLink{DstMac: MacAddr{0x2}, SrcMac: MacAddr{0x2}}, IFIndex: 2, DataLink: DataLink{DstMac: MacAddr{0x2}, SrcMac: MacAddr{0x2}}, IFIndex: 2,
}, RecordMetrics: RecordMetrics{ }, RecordMetrics: RecordMetrics{
Packets: 2, Bytes: 456, Packets: 2, Bytes: 456,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment