mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
fix: handling gracefully tun interfaces [2]
This commit is contained in:
parent
7295c1a5e3
commit
c8a52d3256
1 changed files with 2 additions and 3 deletions
|
@ -81,11 +81,10 @@ func FindGateway(iface *Endpoint) (*Endpoint, error) {
|
||||||
} else {
|
} else {
|
||||||
// we have the address, now we need its mac
|
// we have the address, now we need its mac
|
||||||
mac, err := ArpLookup(iface.Name(), gateway, false)
|
mac, err := ArpLookup(iface.Name(), gateway, false)
|
||||||
if err == nil {
|
if err != nil {
|
||||||
return NewEndpoint(gateway, mac), nil
|
|
||||||
} else {
|
|
||||||
fmt.Printf("%s\n", err)
|
fmt.Printf("%s\n", err)
|
||||||
}
|
}
|
||||||
|
return NewEndpoint(gateway, mac), nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue