Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213875
b: refs/heads/master
c: fe4d434
h: refs/heads/master
i:
  213873: 33a7472
  213871: 258e528
v: v3
  • Loading branch information
Sony Chacko authored and David S. Miller committed Aug 19, 2010
1 parent b543d62 commit bbf7868
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0325d69b2a1feb72f11413dbfcc1705ccfc203c1
refs/heads/master: fe4d434da8e96142e36eb22fc5cf29ef2c2df9c2
1 change: 1 addition & 0 deletions trunk/drivers/net/qlcnic/qlcnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ struct qlcnic_mac_req {
#define QLCNIC_BRIDGE_ENABLED 0X10
#define QLCNIC_DIAG_ENABLED 0x20
#define QLCNIC_ESWITCH_ENABLED 0x40
#define QLCNIC_MACSPOOF 0x200
#define QLCNIC_IS_MSI_FAMILY(adapter) \
((adapter)->flags & (QLCNIC_MSI_ENABLED | QLCNIC_MSIX_ENABLED))

Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/net/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,11 @@ static void
qlcnic_set_eswitch_port_features(struct qlcnic_adapter *adapter,
struct qlcnic_esw_func_cfg *esw_cfg)
{
adapter->flags &= ~QLCNIC_MACSPOOF;
if (adapter->op_mode == QLCNIC_NON_PRIV_FUNC)
if (esw_cfg->mac_anti_spoof)
adapter->flags |= QLCNIC_MACSPOOF;

qlcnic_set_netdev_features(adapter, esw_cfg);
}

Expand Down Expand Up @@ -1912,6 +1917,12 @@ qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
return NETDEV_TX_BUSY;
}

if (adapter->flags & QLCNIC_MACSPOOF) {
if (compare_ether_addr(eth_hdr(skb)->h_source,
adapter->mac_addr))
goto drop_packet;
}

frag_count = skb_shinfo(skb)->nr_frags + 1;

/* 4 fragments per cmd des */
Expand Down

0 comments on commit bbf7868

Please sign in to comment.