diff options
author | Vasu Dev <vasu.dev@intel.com> | 2010-07-20 18:19:32 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 10:05:47 -0400 |
commit | 519e5135e2537c9dbc1cbcc0891b0a936ff5dcd2 (patch) | |
tree | f4b139d0e9288d65a33a43b54e74ef2a6e959d82 /include/scsi | |
parent | 9d4cbc05f32fc0a1024de2a9d5635bc9d180e4ae (diff) |
[SCSI] fcoe: adds src and dest mac address checking for fcoe frames
This is per FC-BB-5 Annex-D recommendation and per that
if address checking fails then drop the frame.
FIP code paths are already doing this so only needed for fcoe
frames.
The src address checking is limited to only fip mode since
this might break non-fip mode used in p2p due to used OUI
based addressing in some p2p code paths, going forward FIP
will be the only mode, therefore limited this to only FIP
mode so that it won't break non-fip p2p mode for now.
-v2
Removes FCOE packet type checking since fcoe_rcv is
registered to receive only FCoE type packets from netdev
and it is already checked by netdev.
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/libfcoe.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index ec13f51531f8..81aee1c4c2f3 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h | |||
@@ -170,4 +170,14 @@ int fcoe_ctlr_recv_flogi(struct fcoe_ctlr *, struct fc_lport *, | |||
170 | u64 fcoe_wwn_from_mac(unsigned char mac[], unsigned int, unsigned int); | 170 | u64 fcoe_wwn_from_mac(unsigned char mac[], unsigned int, unsigned int); |
171 | int fcoe_libfc_config(struct fc_lport *, struct libfc_function_template *); | 171 | int fcoe_libfc_config(struct fc_lport *, struct libfc_function_template *); |
172 | 172 | ||
173 | /** | ||
174 | * is_fip_mode() - returns true if FIP mode selected. | ||
175 | * @fip: FCoE controller. | ||
176 | */ | ||
177 | static inline bool is_fip_mode(struct fcoe_ctlr *fip) | ||
178 | { | ||
179 | return fip->state == FIP_ST_ENABLED; | ||
180 | } | ||
181 | |||
182 | |||
173 | #endif /* _LIBFCOE_H */ | 183 | #endif /* _LIBFCOE_H */ |