瀏覽代碼

[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 年之前
父節點
當前提交
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…
取消
儲存