fix batman interfaces

This commit is contained in:
Martin/Geno 2019-04-30 22:09:31 +02:00 committed by genofire
parent 1a38b5b101
commit b6072a3b48
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
1 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,10 @@ func NewBatman(iface string) *Batman {
log.WithField("iface", iface).Error("not able to run batctl")
return nil
}
b := &Batman{Bridge: iface}
b := &Batman{
Bridge: iface,
Interfaces: []string{iface},
}
for _, line := range strings.Split(string(out), "\n") {
i := strings.Split(line, ":")[0]
if i != "" {