Repository navigation
dhcpv4: parse and emit DHCP Option 42 (NTP servers) - #1205
Open
Aditya-9-6 wants to merge 1 commit into
Open
Aditya-9-6 wants to merge 1 commit into
Aditya-9-6 wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1205 +/- ##
==========================================
+ Coverage 82.57% 82.62% +0.04%
==========================================
Files 83 83
Lines 26174 26249 +75
==========================================
+ Hits 21613 21687 +74
- Misses 4561 4562 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Closes #1178.
Summary
This PR adds support for parsing and emitting DHCP Option 42 (Network Time Protocol Servers) as defined in RFC 2132 §8.3.
Changes
wire::dhcpv4:MAX_NTP_SERVER_COUNT: usize = 3;.ntp_servers: Option<Vec<Ipv4Address, MAX_NTP_SERVER_COUNT>>toRepr.field::OPT_NTP_SERVERS(42).test_emit_offer_ntp.wire:DHCP_MAX_NTP_SERVER_COUNT.socket::dhcpv4:dhcpv4_field::OPT_NTP_SERVERSinDEFAULT_PARAMETER_REQUEST_LIST.ntp_serverstodhcpv4::Config.ntp_serversinConfigevents.Verification
cargo test --lib: 674 passed; 0 failed.cargo fmt --check: Clean.cargo clippy --lib --tests: Clean.