mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
cosmetic: formatting
This commit is contained in:
@@ -50,13 +50,14 @@ func toMapping(f flow) *endpointMapping {
|
||||
// the NAT table.
|
||||
func (n natMapper) applyNAT(rpt report.Report, scope string) {
|
||||
n.flowWalker.walkFlows(func(f flow) {
|
||||
var (
|
||||
mapping = toMapping(f)
|
||||
realEndpointID = report.MakeEndpointNodeID(scope, "", mapping.originalIP, strconv.Itoa(mapping.originalPort))
|
||||
copyEndpointPort = strconv.Itoa(mapping.rewrittenPort)
|
||||
copyEndpointID = report.MakeEndpointNodeID(scope, "", mapping.rewrittenIP, copyEndpointPort)
|
||||
node, ok = rpt.Endpoint.Nodes[realEndpointID]
|
||||
)
|
||||
mapping := toMapping(f)
|
||||
|
||||
realEndpointPort := strconv.Itoa(mapping.originalPort)
|
||||
copyEndpointPort := strconv.Itoa(mapping.rewrittenPort)
|
||||
realEndpointID := report.MakeEndpointNodeID(scope, "", mapping.originalIP, realEndpointPort)
|
||||
copyEndpointID := report.MakeEndpointNodeID(scope, "", mapping.rewrittenIP, copyEndpointPort)
|
||||
|
||||
node, ok := rpt.Endpoint.Nodes[realEndpointID]
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
@@ -66,6 +67,5 @@ func (n natMapper) applyNAT(rpt report.Report, scope string) {
|
||||
Port: copyEndpointPort,
|
||||
"copy_of": realEndpointID,
|
||||
}))
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user