correctly reverse-resolve source of inbound connections

There were two problems:
- the renderer was looking for reverse names on the destination
- the probe was not annotating source nodes with reverse-resolved names

Fixes #1847
This commit is contained in:
Matthias Radestock
2016-09-02 20:31:03 +01:00
parent 813ea780dc
commit 5bc3a9d5ac
2 changed files with 4 additions and 1 deletions

View File

@@ -196,6 +196,9 @@ func (r *Reporter) addConnection(rpt *report.Report, t fourTuple, namespaceID st
// In case we have a reverse resolution for the IP, we can use it for
// the name...
if fromNames, err := r.reverseResolver.get(t.fromAddr); err == nil {
fromNode = fromNode.WithSet(ReverseDNSNames, report.MakeStringSet(fromNames...))
}
if toNames, err := r.reverseResolver.get(t.toAddr); err == nil {
toNode = toNode.WithSet(ReverseDNSNames, report.MakeStringSet(toNames...))
}

View File

@@ -145,7 +145,7 @@ func outgoingConnectionsSummary(topologyID string, r report.Report, n report.Nod
if !ok {
continue
}
key := newConnection(n, node, port, remoteEndpointID, localAddr)
key := newConnection(n, node, port, localEndpoint.ID, localAddr)
counts[key] = counts[key] + 1
}
}