Skip to content

Commit

Permalink
beceem: remove ARP spoofing
Browse files Browse the repository at this point in the history
Linux support NOARP flag, so the whole Arp spoofing routines
are not needed.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
  • Loading branch information
Stephen Hemminger committed Nov 1, 2010
1 parent 6ba8fe7 commit 7441698
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 107 deletions.
94 changes: 0 additions & 94 deletions drivers/staging/bcm/Arp.c

This file was deleted.

3 changes: 3 additions & 0 deletions drivers/staging/bcm/Bcmnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ int register_networkdev(PMINI_ADAPTER Adapter)
net->ethtool_ops = &bcm_ethtool_ops;
net->mtu = MTU_SIZE; /* 1400 Bytes */
net->tx_queue_len = TX_QLEN;
net->flags |= IFF_NOARP;
net->flags &= ~(IFF_BROADCAST|IFF_MULTICAST);

netif_carrier_off(net);

SET_NETDEV_DEVTYPE(net, &wimax_type);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/bcm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ obj-$(CONFIG_BCM_WIMAX) += bcm_wimax.o

bcm_wimax-y := InterfaceDld.o InterfaceIdleMode.o InterfaceInit.o InterfaceRx.o \
InterfaceIsr.o InterfaceMisc.o InterfaceTx.o \
Arp.o CmHost.o IPv6Protocol.o Qos.o Transmit.o\
CmHost.o IPv6Protocol.o Qos.o Transmit.o\
Bcmnet.o DDRInit.o HandleControlPacket.o\
LeakyBucket.o Misc.o sort.o Bcmchar.o hostmibs.o PHSModule.o\
led_control.o nvm.o vendorspecificextn.o
15 changes: 3 additions & 12 deletions drivers/staging/bcm/Transmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
digraph transmit1 {
node[shape=box]
edge[weight=5;color=red]
bcm_transmit->reply_to_arp_request[label="ARP"]
bcm_transmit->GetPacketQueueIndex[label="IP Packet"]
GetPacketQueueIndex->IpVersion4[label="IPV4"]
GetPacketQueueIndex->IpVersion6[label="IPV6"]
Expand Down Expand Up @@ -63,17 +63,8 @@ netdev_tx_t bcm_transmit(struct sk_buff *skb, struct net_device *dev)

qindex = GetPacketQueueIndex(Adapter, skb);

if (INVALID_QUEUE_INDEX==qindex) {
if (ntohs(eth_hdr(skb)->h_proto) != ETH_ARP_FRAME)
goto drop;

/*
Reply directly to ARP request packet
ARP Spoofing only if NO ETH CS rule matches for it
*/
reply_to_arp_request(skb);
return NETDEV_TX_OK;
}
if (INVALID_QUEUE_INDEX==qindex)
goto drop;

if (Adapter->PackInfo[qindex].uiCurrentPacketsOnHost >= SF_MAX_ALLOWED_PACKETS_TO_BACKUP)
return NETDEV_TX_BUSY;
Expand Down

0 comments on commit 7441698

Please sign in to comment.