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
Ignore unrecognized NDISC options (as per RFC 4861). #210
Conversation
src/wire/ndisc.rs
Outdated
@@ -228,7 +228,7 @@ impl<'a> Repr<'a> { | |||
let opt = NdiscOption::new_checked(packet.payload())?; | |||
match opt.option_type() { | |||
NdiscOptionType::SourceLinkLayerAddr => Some(opt.link_layer_addr()), | |||
_ => { return Err(Error::Unrecognized); } | |||
_ => {} |
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.
Very minor nit: we use ()
for the do-nothing case. r=me once this is fixed.
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.
Fixed!
04e3e68
to
ecedf6d
Compare
@m-labs-homu r+ |
📌 Commit ecedf6d has been approved by |
Closes: #210 Approved by: whitequark
💔 Test failed - status-travis |
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.
Good catch. Use None
instead of ()
.
ecedf6d
to
3398964
Compare
@m-labs-homu r+ |
📌 Commit 3398964 has been approved by |
☀️ Test successful - status-travis |
https://tools.ietf.org/html/rfc4861#section-4