Browse Source

[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>
tags/v1.20.1
Michael Brown 11 years ago
parent
commit
595e32d7ab
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/net/ipv6.c

+ 1
- 1
src/net/ipv6.c View File

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

Loading…
Cancel
Save