Skip to content

Commit

Permalink
forgot this one in #2622
Browse files Browse the repository at this point in the history
  • Loading branch information
rade committed Jun 20, 2017
1 parent 98f0363 commit 4a54b75
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions probe/docker/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,13 @@ func (r *Reporter) Report() (report.Report, error) {
}

func getLocalIPs() ([]string, error) {
addrs, err := net.InterfaceAddrs()
ipnets, err := report.GetLocalNetworks()
if err != nil {
return nil, err
}
ips := []string{}
for _, addr := range addrs {
// Not all addrs are IPNets.
if ipNet, ok := addr.(*net.IPNet); ok {
ips = append(ips, ipNet.IP.String())
}
for _, ipnet := range ipnets {
ips = append(ips, ipnet.IP.String())
}
return ips, nil
}
Expand Down

0 comments on commit 4a54b75

Please sign in to comment.