mirror of https://github.com/ipxe/ipxe.git
[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
parent
0780bccb68
commit
595e32d7ab
|
@ -250,7 +250,7 @@ static int ipv6_check_options ( struct ipv6_header *iphdr,
|
||||||
if ( option->type == IPV6_OPT_PAD1 ) {
|
if ( option->type == IPV6_OPT_PAD1 ) {
|
||||||
option = ( ( ( void * ) option ) + 1 );
|
option = ( ( ( void * ) option ) + 1 );
|
||||||
} else {
|
} else {
|
||||||
option = ( ( ( void * ) option ) + option->len );
|
option = ( ( ( void * ) option->value ) + option->len );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue