[ipv6] Rework option parsing for router solicitation and neighbour advertisement...
commitec3738fd4122856498b305c28a554d1fcef9efd0
authorMatthew Iselin <matthew@theiselins.net>
Mon, 18 Jul 2011 00:59:39 +0000 (18 10:59 +1000)
committerMarty Connor <mdc@etherboot.org>
Thu, 21 Jul 2011 11:26:32 +0000 (21 07:26 -0400)
tree52218bc0a9caa1080c860e4f31bd049819625812
parent711a318453fd4216aa645b0151fe7861fe8b4396
[ipv6] Rework option parsing for router solicitation and neighbour advertisement handling

Instead of using an "offset" variable, use iob_pull and iob_len to
retrieve options from the packet buffer.

Also, neighbour advertisements no longer assume anything about the
layout of the packet that has been received. Previously, if any other
option was present before the link-layer address, the assertions would
fail and the packet would be ignored. Now, the option list is
traversed and the correct options are used as necessary.

Signed-off-by: Matthew Iselin <matthew@theiselins.net>
Signed-off-by: Marty Connor <mdc@etherboot.org>
src/net/ndp.c