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

Only use first 3 DHCP advertised DNS servers (cf #305) #306

Merged
merged 2 commits into from Sep 30, 2019

Conversation

cjbe
Copy link
Contributor

@cjbe cjbe commented Sep 12, 2019

No description provided.

The OPT_DOMAIN_NAME_SERVER DHCP option field can advertise an unbounded
number of DNS servers. This adds a test that we correctly parse packets
with more DNS servers advertised than we can fit in our fixed length buffer.
The OPT_DOMAIN_NAME_SERVER option can advertise an arbitrary number of
DNS servers, but we currently use a fixed length array to store these
servers. This commit ensures only the first 3 (highest priority) servers
are used.
Copy link
Contributor

@astro astro left a comment

Choose a reason for hiding this comment

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

This fixes an oversight of mine. Thank you!

@whitequark whitequark merged commit 15a3e84 into smoltcp-rs:master Sep 30, 2019
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.

None yet

3 participants