-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use connection directions from conntrack where possible #967
Conversation
toAddr, toPort = f.Original.Layer3.DstIP, uint16(f.Original.Layer4.DstPort) | ||
tuple = []string{ | ||
fmt.Sprintf("%s:%d", fromAddr, fromPort), | ||
fmt.Sprintf("%s:%d", toAddr, toPort), |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
seenTuples[strings.Join(tuple, " ")] = fourTuple{fromAddr, toAddr, fromPort, toPort} | ||
// TODO(paulbellamy): Won't adding this from conntrack, and adding the | ||
// edge again here result in double-counting? Also, if we've seen the | ||
// same conn twice from proc (if both ends are on the same host). |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Also, the TestSpyNoProcesses and 340_process_edge_across_host_2_test are probably related. |
1d9e3ac
to
9b280e3
Compare
remotePort = conn.RemotePort | ||
localAddr = conn.LocalAddress.String() | ||
remoteAddr = conn.RemoteAddress.String() | ||
tuple = fourTuple{conn.LocalAddress.String(), conn.RemoteAddress.String(), conn.LocalPort, conn.RemotePort} |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
A bit nit picky (sorry!) but otherwise LGTM. Please squash. |
c72fe08
to
c217acb
Compare
* Remove report.EdgeMetadata.MaxConnCountTCP, as we don't display it anywhere * Remove hostname metadata from local end of connection. We should be using the hostnodeid
c217acb
to
6cef1b1
Compare
LGTM, assuming tests now pass. |
Use connection directions from conntrack where possible
Fixes #539
Needs in-depth review from @tomwilkie and/or @peterbourgon