Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### Fixed

* Fix confusing error message on macOS when running without sudo #492 - @chiranjeevi-max
* Fix Ctrl+C handling to use SIGINT signal instead of keypress #491 - @chiranjeevi-max
* Update CONTRIBUTING information #438 - @YJDoc2 @cyqsimon
* Fix new clippy lint #457 - @cyqsimon
Expand Down
7 changes: 7 additions & 0 deletions src/os/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ pub(crate) fn get_datalink_channel(
ErrorKind::PermissionDenied => Err(GetInterfaceError::PermissionError(
interface.name.to_owned(),
)),
// on macOS/FreeBSD, permission errors when opening BPF devices manifest as
// "No such file or directory" (ENOENT) rather than EPERM
// see https://github.com/imsnif/bandwhich/issues/486
#[cfg(any(target_os = "macos", target_os = "freebsd"))]
ErrorKind::NotFound => Err(GetInterfaceError::PermissionError(
interface.name.to_owned(),
)),
_ => Err(GetInterfaceError::OtherError(format!(
"{}: {e}",
&interface.name
Expand Down
Loading