[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>
pull/15/head
Michael Brown 2013-10-23 13:05:23 +01:00
parent 0780bccb68
commit 595e32d7ab
1 changed files with 1 additions and 1 deletions

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;