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
 		if ( option->type == IPV6_OPT_PAD1 ) {
250
 		if ( option->type == IPV6_OPT_PAD1 ) {
251
 			option = ( ( ( void * ) option ) + 1 );
251
 			option = ( ( ( void * ) option ) + 1 );
252
 		} else {
252
 		} else {
253
-			option = ( ( ( void * ) option ) + option->len );
253
+			option = ( ( ( void * ) option->value ) + option->len );
254
 		}
254
 		}
255
 	}
255
 	}
256
 	return 0;
256
 	return 0;

Loading…
Cancel
Save