-
Notifications
You must be signed in to change notification settings - Fork 433
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
Subnet broadcasts #377
Subnet broadcasts #377
Conversation
Seems like the travis errors are unrelated, as they fail on current master too? |
No idea what happened with tests, shouldn't that be impossible with protected branches, anyway? |
Yes, master is broken, with |
0c7aac7
to
7f31e71
Compare
Should probably be squashed, looks reasonable otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this check be applied to all ip_addrs associated with the iface?
I'd say yes. We process unicast packets for all our IPs, IMO it's quite strange that we only process broadcast packets for the first one.
Looks great otherwise! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great now that it checks all our addrs!
Commits got somehow duplicated when merging, can you rebase on top of master?
Will do, some tests are still failing so I'll fix those first and then squash. |
a27006d
to
5b2cee5
Compare
Should be good to go :) |
There's still a clippy failure :( |
5b2cee5
to
4225979
Compare
Whoops, must have missed that! Should be fixed now, sorry about that :) |
Adds `is_subnet_broadcast` to the ethernet interface which checks for subnet broadcasts, which are discussed on page 8 in https://tools.ietf.org/html/rfc917. The subnet broadcast addresses are derived from the interfaces ipv4 addresses.
4225979
to
c492ed2
Compare
Fairly minor change, but I realised only ipv4 has the concept of broadcasts, so I removed a pointless match, and instead just pass the ip directly. |
Awesome! Thank you! |
I previously opened this before, but I think it got lost the repo ownership changes.
Currently smoltcp only responds to physical layer broadcasts (255.255.255.255), this PR enables the interface to respond to subnet broadcasts, as discussed in https://tools.ietf.org/html/rfc917 chapter 8.
Questions
ip_addrs
associated with the iface?