[ipv6] Handle IPv6 option length correctly

The IPv6 option length field represents the length of the option data
field, not the overall length of the option.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-10-23 13:05:23 +01:00
parent 0780bccb68
commit 595e32d7ab

View File

@@ -250,7 +250,7 @@ static int ipv6_check_options ( struct ipv6_header *iphdr,
if ( option->type == IPV6_OPT_PAD1 ) {
option = ( ( ( void * ) option ) + 1 );
} else {
option = ( ( ( void * ) option ) + option->len );
option = ( ( ( void * ) option->value ) + option->len );
}
}
return 0;