-
Notifications
You must be signed in to change notification settings - Fork 500
Add a few DHCP options #255
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
Conversation
src/wire/ip.rs
Outdated
| } | ||
|
|
||
| /// Treat as subnet mask, get position of first 0 | ||
| pub fn to_prefix_len(&self) -> u8 { |
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.
Either this function shouldn't be pub, or it should perform more validation and ensure that self is a CIDR subnet mask.
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.
I pushed another commit now that adds to_prefix_len() with the requested validation. Because the fn can remain pub, Travis-CI should run without any unused fn failures this time.
|
Thanks. Can you please squash? (I wish Homu could do that itself... sadly autosquash is broken on it.) |
|
Squashed. Travis is failing due to this one unused function that is required in #186. |
f36715f to
2542a90
Compare
| } | ||
|
|
||
| /// If `self` is a CIDR-compatible subnet mask, return `Some(prefix_len)`, | ||
| /// where `prefix_len` is the number of leading zeroes. Return `None` 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.
This docstring wasn't particularly great; I fixed it.
|
@m-labs-homu r+ |
|
📌 Commit 565cdad has been approved by |
Closes: #255 Approved by: whitequark
|
☀️ Test successful - status-travis |
Separate PR as requested in #186 (comment)