Skip to main content

decode_options

Function decode_options 

Source
pub fn decode_options(data: &[u8]) -> Result<Vec<NdpOption>>
Expand description

Decode a run of options.

RFC 4861 §4.6: “Nodes MUST silently discard an ND packet that contains an option with length zero.” That is not pedantry — a zero length is an infinite loop in a naive walker, and it is how a malicious neighbour wedges a stack.