mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 04:52:10 -07:00
fix: do not attempt mac lookup if gateway is empty
This commit is contained in:
parent
23e074b686
commit
b0d56e4f5e
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ func FindGateway(iface *Endpoint) (*Endpoint, error) {
|
|||
if gateway == iface.IpAddress {
|
||||
Debug("gateway is the interface")
|
||||
return iface, nil
|
||||
} else {
|
||||
} else if gateway != "" {
|
||||
// we have the address, now we need its mac
|
||||
mac, err := ArpLookup(iface.Name(), gateway, false)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue