Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:shipt/specter
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyorama-shipt committed Nov 1, 2019
2 parents d9e7ab9 + 0c11b9d commit 2bdbaa1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/logprocessor/logprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package logprocessor

import (
"encoding/json"
"net"

"github.com/shipt/specter/internal/ttlcache"

Expand Down Expand Up @@ -59,12 +60,10 @@ func (c *Client) parseResponse(body []byte) ([]byte, error) {
}

conn := connection{}
conn.XFwdFor = rb.XFwdFor
if conn.XFwdFor != "" {
if conn.XFwdFor != "-" {
conn.SrcIP = rb.XFwdFor
}
} else {

conn.SrcIP = rb.XFwdFor
validIP := net.ParseIP(rb.XFwdFor)
if validIP.To4() == nil {
conn.SrcIP = rb.SrcIP
}

Expand Down

0 comments on commit 2bdbaa1

Please sign in to comment.