Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix raw_socket on macos #979

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

hikaricai
Copy link

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.

@whitequark
Copy link
Contributor

I wonder if we should have a macOS test runner?

@thvdveld
Copy link
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 BfpDevice something we can add to smoltcp? Or could you share where I could find this implementation?

@thvdveld
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants