Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221477
b: refs/heads/master
c: 0ee31cb
h: refs/heads/master
i:
  221475: 0e5c213
v: v3
  • Loading branch information
Robert Love authored and James Bottomley committed Oct 25, 2010
1 parent b0f2209 commit e85d24c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2dc02ee52f32aac6d8dd1172f104dc30ae1051bb
refs/heads/master: 0ee31cb5df4b717de923266879964d0418c3308f
16 changes: 6 additions & 10 deletions trunk/drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,6 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
struct fcoe_interface *fcoe;
struct fc_frame_header *fh;
struct fcoe_percpu_s *fps;
struct fcoe_port *port;
struct ethhdr *eh;
unsigned int cpu;

Expand All @@ -1262,16 +1261,7 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
skb_tail_pointer(skb), skb_end_pointer(skb),
skb->csum, skb->dev ? skb->dev->name : "<NULL>");

/* check for mac addresses */
eh = eth_hdr(skb);
port = lport_priv(lport);
if (compare_ether_addr(eh->h_dest, port->data_src_addr) &&
compare_ether_addr(eh->h_dest, fcoe->ctlr.ctl_src_addr) &&
compare_ether_addr(eh->h_dest, (u8[6])FC_FCOE_FLOGI_MAC)) {
FCOE_NETDEV_DBG(netdev, "wrong destination mac address:%pM\n",
eh->h_dest);
goto err;
}

if (is_fip_mode(&fcoe->ctlr) &&
compare_ether_addr(eh->h_source, fcoe->ctlr.dest_addr)) {
Expand All @@ -1291,6 +1281,12 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
skb_set_transport_header(skb, sizeof(struct fcoe_hdr));
fh = (struct fc_frame_header *) skb_transport_header(skb);

if (ntoh24(&eh->h_dest[3]) != ntoh24(fh->fh_d_id)) {
FCOE_NETDEV_DBG(netdev, "FC frame d_id mismatch with MAC:%pM\n",
eh->h_dest);
goto err;
}

fr = fcoe_dev_from_skb(skb);
fr->fr_dev = lport;
fr->ptype = ptype;
Expand Down

0 comments on commit e85d24c

Please sign in to comment.