diff options
author | Hannes Reinecke <hare@suse.de> | 2016-10-13 16:10:59 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-09 01:29:53 +0300 |
commit | f7e6ed0654128979a1939be6640416abb6a54811 (patch) | |
tree | b488c4ac9a573bee55a385c6a387e686fb31ee19 /drivers/scsi/fcoe/fcoe.c | |
parent | c959655042b8eb4814e849dde4518682c6d963e1 (diff) | |
download | linux-f7e6ed0654128979a1939be6640416abb6a54811.tar.xz |
scsi: fcoe: correct sending FIP VLAN packets on VLAN 0
The FIP VLAN frame consists of an ethernet header followed
by the FIP VLAN frame, so we need to skip the ethernet header
if we want to check the FIP opcode.
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.c')
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 9876fca8946a..cf4adaafd668 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -590,7 +590,8 @@ static void fcoe_fip_send(struct fcoe_ctlr *fip, struct sk_buff *skb) * Use default VLAN for FIP VLAN discovery protocol */ frame = (struct fip_frame *)skb->data; - if (frame->fip.fip_op == ntohs(FIP_OP_VLAN) && + if (ntohs(frame->eth.h_proto) == ETH_P_FIP && + ntohs(frame->fip.fip_op) == FIP_OP_VLAN && fcoe->realdev != fcoe->netdev) skb->dev = fcoe->realdev; else |