Skip to content

Commit

Permalink
fix raw_socket on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
hikaricai committed Aug 23, 2024
1 parent 8e3ea5c commit 90335f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/phy/raw_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ impl RawSocket {
mtu += 2;
}

#[cfg(feature = "medium-ethernet")]
#[cfg(all(
feature = "medium-ethernet",
not(any(target_os = "macos", target_os = "openbsd"))
))]
if medium == Medium::Ethernet {
// SIOCGIFMTU returns the IP MTU (typically 1500 bytes.)
// smoltcp counts the entire Ethernet packet in the MTU, so add the Ethernet header size to it.
Expand Down

0 comments on commit 90335f0

Please sign in to comment.