Skip to content

Commit

Permalink
fix: returning error when neither iw or iwconfig are found
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Mar 29, 2021
1 parent 67a0063 commit c4bbc12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions network/net_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ func SetInterfaceChannel(iface string, channel int) error {
} else if out != "" {
return fmt.Errorf("Unexpected output while setting interface %s to channel %d: %s", iface, channel, out)
}
} else {
return fmt.Errorf("no iw or iwconfig binaries found in $PATH")
}

SetInterfaceCurrentChannel(iface, channel)
Expand Down

0 comments on commit c4bbc12

Please sign in to comment.