mirror of
https://github.com/bettercap/bettercap
synced 2025-07-05 20:42:09 -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 {
|
if gateway == iface.IpAddress {
|
||||||
Debug("gateway is the interface")
|
Debug("gateway is the interface")
|
||||||
return iface, nil
|
return iface, nil
|
||||||
} else {
|
} else if gateway != "" {
|
||||||
// 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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue