diff options
author | Michael Brown | 2010-11-27 16:48:01 +0100 |
---|---|---|
committer | Michael Brown | 2010-11-27 17:04:57 +0100 |
commit | 54ec712ebeb6076ec1c958076da41c804fded378 (patch) | |
tree | 476f1f6e271ae59353cad42f58cc3c4dffea45a9 /src/net/fcoe.c | |
parent | [vlan] Treat VLAN 0 as valid (diff) | |
download | ipxe-54ec712ebeb6076ec1c958076da41c804fded378.tar.gz ipxe-54ec712ebeb6076ec1c958076da41c804fded378.tar.xz ipxe-54ec712ebeb6076ec1c958076da41c804fded378.zip |
[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>
Diffstat (limited to 'src/net/fcoe.c')
-rw-r--r-- | src/net/fcoe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net/fcoe.c b/src/net/fcoe.c index c43fef61..db2fc980 100644 --- a/src/net/fcoe.c +++ b/src/net/fcoe.c @@ -533,7 +533,9 @@ static int fcoe_fip_parse ( struct fcoe_port *fcoe, struct fip_header *fiphdr, /* 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; } |