File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
88
99### Fixed
1010
11+ * Fix confusing error message on macOS when running without sudo #492 - @chiranjeevi-max
1112* Fix Ctrl+C handling to use SIGINT signal instead of keypress #491 - @chiranjeevi-max
1213* Update CONTRIBUTING information #438 - @YJDoc2 @cyqsimon
1314* Fix new clippy lint #457 - @cyqsimon
Original file line number Diff line number Diff line change @@ -76,6 +76,13 @@ pub(crate) fn get_datalink_channel(
7676 ErrorKind :: PermissionDenied => Err ( GetInterfaceError :: PermissionError (
7777 interface. name . to_owned ( ) ,
7878 ) ) ,
79+ // on macOS/FreeBSD, permission errors when opening BPF devices manifest as
80+ // "No such file or directory" (ENOENT) rather than EPERM
81+ // see https://github.com/imsnif/bandwhich/issues/486
82+ #[ cfg( any( target_os = "macos" , target_os = "freebsd" ) ) ]
83+ ErrorKind :: NotFound => Err ( GetInterfaceError :: PermissionError (
84+ interface. name . to_owned ( ) ,
85+ ) ) ,
7986 _ => Err ( GetInterfaceError :: OtherError ( format ! (
8087 "{}: {e}" ,
8188 & interface. name
You can’t perform that action at this time.
0 commit comments