aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/fcoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.c')
-rw-r--r--drivers/scsi/fcoe/fcoe.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 8225b821a906..d23a538a9dfc 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1243,7 +1243,6 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
1243 struct fcoe_interface *fcoe; 1243 struct fcoe_interface *fcoe;
1244 struct fc_frame_header *fh; 1244 struct fc_frame_header *fh;
1245 struct fcoe_percpu_s *fps; 1245 struct fcoe_percpu_s *fps;
1246 struct fcoe_port *port;
1247 struct ethhdr *eh; 1246 struct ethhdr *eh;
1248 unsigned int cpu; 1247 unsigned int cpu;
1249 1248
@@ -1262,16 +1261,7 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
1262 skb_tail_pointer(skb), skb_end_pointer(skb), 1261 skb_tail_pointer(skb), skb_end_pointer(skb),
1263 skb->csum, skb->dev ? skb->dev->name : "<NULL>"); 1262 skb->csum, skb->dev ? skb->dev->name : "<NULL>");
1264 1263
1265 /* check for mac addresses */
1266 eh = eth_hdr(skb); 1264 eh = eth_hdr(skb);
1267 port = lport_priv(lport);
1268 if (compare_ether_addr(eh->h_dest, port->data_src_addr) &&
1269 compare_ether_addr(eh->h_dest, fcoe->ctlr.ctl_src_addr) &&
1270 compare_ether_addr(eh->h_dest, (u8[6])FC_FCOE_FLOGI_MAC)) {
1271 FCOE_NETDEV_DBG(netdev, "wrong destination mac address:%pM\n",
1272 eh->h_dest);
1273 goto err;
1274 }
1275 1265
1276 if (is_fip_mode(&fcoe->ctlr) && 1266 if (is_fip_mode(&fcoe->ctlr) &&
1277 compare_ether_addr(eh->h_source, fcoe->ctlr.dest_addr)) { 1267 compare_ether_addr(eh->h_source, fcoe->ctlr.dest_addr)) {
@@ -1291,6 +1281,12 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
1291 skb_set_transport_header(skb, sizeof(struct fcoe_hdr)); 1281 skb_set_transport_header(skb, sizeof(struct fcoe_hdr));
1292 fh = (struct fc_frame_header *) skb_transport_header(skb); 1282 fh = (struct fc_frame_header *) skb_transport_header(skb);
1293 1283
1284 if (ntoh24(&eh->h_dest[3]) != ntoh24(fh->fh_d_id)) {
1285 FCOE_NETDEV_DBG(netdev, "FC frame d_id mismatch with MAC:%pM\n",
1286 eh->h_dest);
1287 goto err;
1288 }
1289
1294 fr = fcoe_dev_from_skb(skb); 1290 fr = fcoe_dev_from_skb(skb);
1295 fr->fr_dev = lport; 1291 fr->fr_dev = lport;
1296 fr->ptype = ptype; 1292 fr->ptype = ptype;