Skip to content

Commit

Permalink
fix dupplicates addreses on babel
Browse files Browse the repository at this point in the history
  • Loading branch information
genofire committed May 18, 2019
1 parent fe9eb0a commit 9f42724
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions respond/daemon/nodeinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ func (d *Daemon) updateNodeinfo(iface string, resp *data.ResponseData) {

if iface != "" {
resp.Nodeinfo.Network.Addresses = getAddresses(iface)
} else {
resp.Nodeinfo.Network.Addresses = []string{}
}

resp.Nodeinfo.Network.Mesh = make(map[string]*data.NetworkInterface)
for _, bface := range d.Batman {

Expand Down Expand Up @@ -100,9 +101,8 @@ func (d *Daemon) updateNodeinfo(iface string, resp *data.ResponseData) {
}
if sbu.EntryData["up"].(bool) {
addr := sbu.EntryData["ipv6"].(string)

resp.Nodeinfo.Network.Addresses = append(resp.Nodeinfo.Network.Addresses, addr)
meshBabel.Interfaces.Tunnel = append(meshBabel.Interfaces.Tunnel, addr)
resp.Nodeinfo.Network.Addresses = append(resp.Nodeinfo.Network.Addresses, addr)
}
return nil
})
Expand Down

0 comments on commit 9f42724

Please sign in to comment.