mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: do not show gateway warning if the interface is not connected to any network
This commit is contained in:
parent
ae223d7110
commit
3c798794eb
3 changed files with 13 additions and 4 deletions
|
@ -227,7 +227,11 @@ func (s *Session) Start() error {
|
|||
}
|
||||
|
||||
if s.Gateway, err = network.FindGateway(s.Interface); err != nil {
|
||||
s.Events.Log(log.WARNING, "%s", err.Error())
|
||||
level := log.WARNING
|
||||
if s.Interface.IsMonitor() {
|
||||
level = log.DEBUG
|
||||
}
|
||||
s.Events.Log(level, "%s", err.Error())
|
||||
}
|
||||
|
||||
if s.Gateway == nil || s.Gateway.IpAddress == s.Interface.IpAddress {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue