fix raw_socket on macos#979
Open
hikaricai wants to merge 1 commit intosmoltcp-rs:mainfrom
Open
Conversation
Contributor
|
I wonder if we should have a macOS test runner? |
Contributor
|
smoltcp currently doesn't have any device implementation for macOS, I think (correct me if I'm wrong)? The TUN/TAP devices are only compiled for Linux or Android. Is the |
Contributor
|
@whitequark I made changes in my fork to add macOS test runners (thvdveld#8), however, I'm not sure if it is really necessary. I don't think smoltcp contains code that is specific for macOS. As explained in my previous comment, smoltcp does not have a macOS specific device, such as the tuntap devices for Linux. Let me know if I need to open a PR to add the macOS runners. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently BfpDevice::interface_mtu() return 4096, and RawSocket::new() would add it with EthernetFrame::header_len(), so BfpDevice::recv() would return "Invalid argument (os error 22)".
This patch avoids adding mtu with ether_hdr_len for raw_socket on macos, maybe we will also avoid adding Ieee802154 extral hdr_len.