Skip to content

Commit 2c9726a

Browse files
Merge pull request #126 from step-security/int
Only log from netmon when packet dropped
2 parents db323b1 + ce71709 commit 2c9726a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

netmon.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ func (netMonitor *NetworkMonitor) handlePacket(attrs nflog.Attribute) {
9191
ipAddresses[ipv4Address] = 1
9292

9393
if isSYN {
94-
netMonitor.ApiClient.sendNetConnection(netMonitor.CorrelationId, netMonitor.Repo,
95-
ipv4Address, port, "", netMonitor.Status, timestamp, Tool{Name: Unknown, SHA256: Unknown})
96-
9794
if netMonitor.Status == "Dropped" {
95+
96+
netMonitor.ApiClient.sendNetConnection(netMonitor.CorrelationId, netMonitor.Repo,
97+
ipv4Address, port, "", netMonitor.Status, timestamp, Tool{Name: Unknown, SHA256: Unknown})
98+
9899
go WriteLog(fmt.Sprintf("ip address dropped: %s", ipv4Address))
99100

100101
if ipv4Address != StepSecuritySinkHoleIPAddress { // Sinkhole IP address will be covered by DNS block

0 commit comments

Comments
 (0)