Kaynağa Gözat

[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 yıl önce
ebeveyn
işleme
595e32d7ab
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1
    1
      src/net/ipv6.c

+ 1
- 1
src/net/ipv6.c Dosyayı Görüntüle

@@ -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…
İptal
Kaydet