소스 검색

[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 10 년 전
부모
커밋
595e32d7ab
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      src/net/ipv6.c

+ 1
- 1
src/net/ipv6.c 파일 보기

@@ -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…
취소
저장