Просмотр исходного кода

[fcoe] Use only the first instance of a FIP descriptor

Almost all FIP packets contain at most one instance of each
descriptor.  A VLAN notification may contain multiple VLAN
descriptors.  The FCoE specification does not provide any guidance
regarding prioritisation of VLANs, so we may choose to arbitrarily
choose the first listed VLAN.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 15 лет назад
Родитель
Сommit
54ec712ebe
1 измененных файлов: 3 добавлений и 1 удалений
  1. 3
    1
      src/net/fcoe.c

+ 3
- 1
src/net/fcoe.c Просмотреть файл

533
 		/* Handle descriptors that we understand */
533
 		/* Handle descriptors that we understand */
534
 		if ( ( desc_type > FIP_RESERVED ) &&
534
 		if ( ( desc_type > FIP_RESERVED ) &&
535
 		     ( desc_type < FIP_NUM_DESCRIPTOR_TYPES ) ) {
535
 		     ( desc_type < FIP_NUM_DESCRIPTOR_TYPES ) ) {
536
-			descs->desc[desc_type] = desc;
536
+			/* Use only the first instance of a descriptor */
537
+			if ( descs->desc[desc_type] == NULL )
538
+				descs->desc[desc_type] = desc;
537
 			continue;
539
 			continue;
538
 		}
540
 		}
539
 
541
 

Загрузка…
Отмена
Сохранить