Skip to content

IPv4: Don't discard from unspecified src addresses #787

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

Merged
merged 1 commit into from
May 25, 2023

Conversation

bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented May 12, 2023

IPv4 packets from 0.0.0.0 get discarded early. This makes it impossible to create a DHCP server.

Not sure if this is the right location or even the right approach for this fix.

Maybe there is also a way to make this work without modifying the code?

@codecov
Copy link

codecov bot commented May 12, 2023

Codecov Report

Merging #787 (7199ad3) into master (e4e39ac) will increase coverage by 0.24%.
The diff coverage is 50.00%.

❗ Current head 7199ad3 differs from pull request most recent head 74fd2ae. Consider uploading reports for the commit 74fd2ae to get more accurate results

@@            Coverage Diff             @@
##           master     #787      +/-   ##
==========================================
+ Coverage   80.08%   80.33%   +0.24%     
==========================================
  Files          69       65       -4     
  Lines       28730    26871    -1859     
==========================================
- Hits        23009    21586    -1423     
+ Misses       5721     5285     -436     
Impacted Files Coverage Δ
src/iface/interface/ipv4.rs 71.46% <50.00%> (ø)

... and 15 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@thvdveld
Copy link
Contributor

thvdveld commented May 25, 2023

I think this is fine. We just need to make sure that we don't transmit to the unspecified address. Which we check here:

https://github.com/smoltcp-rs/smoltcp/blob/master/src/iface/interface/mod.rs#L1647

@bjoernQ
Copy link
Contributor Author

bjoernQ commented May 25, 2023

Thanks! That's good news
Any pointer at where to add tests to make codecov happy? (Sorry, first contribution here)

@thvdveld
Copy link
Contributor

I think it's fine. I think the codecov setup is not yet complete. It should not fail CI in this case. I made some changes to CI in #789. Maybe if you can rebase on master, then we can check if CI still fails or not.

@bjoernQ bjoernQ force-pushed the receive-from-0.0.0.0 branch from 7199ad3 to 74fd2ae Compare May 25, 2023 12:47
@bjoernQ
Copy link
Contributor Author

bjoernQ commented May 25, 2023

I think it's fine. I think the codecov setup is not yet complete. It should not fail CI in this case. I made some changes to CI in #789. Maybe if you can rebase on master, then we can check if CI still fails or not.

Awesome, that worked! Thanks a lot

Copy link
Member

@Dirbaio Dirbaio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

bors r+

@bors
Copy link
Contributor

bors bot commented May 25, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 6687745 into smoltcp-rs:master May 25, 2023
knt2h3 added a commit to knt2h3/smoltcp that referenced this pull request May 21, 2024
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