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>
/* Handle descriptors that we understand */
if ( ( desc_type > FIP_RESERVED ) &&
( desc_type < FIP_NUM_DESCRIPTOR_TYPES ) ) {
- descs->desc[desc_type] = desc;
+ /* Use only the first instance of a descriptor */
+ if ( descs->desc[desc_type] == NULL )
+ descs->desc[desc_type] = desc;
continue;
}