Skip to content

Commit

Permalink
driver/net/benet: fix be_cmd_multicast_set() memcpy bug
Browse files Browse the repository at this point in the history
Regarding  benet be_cmd_multicast_set() function, now using
netdev_for_each_mc_addr() helper for mac address copy, but
when copying to req->mac[] did not increase of the index.

Cc: Sathya Perla <sathyap@serverengines.com>
Cc: Subbu Seetharaman <subbus@serverengines.com>
Cc: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Cc: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Jin authored and David S. Miller committed Dec 8, 2010
1 parent e8d34a8 commit 408cc29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id,

i = 0;
netdev_for_each_mc_addr(ha, netdev)
memcpy(req->mac[i].byte, ha->addr, ETH_ALEN);
memcpy(req->mac[i++].byte, ha->addr, ETH_ALEN);
} else {
req->promiscuous = 1;
}
Expand Down

0 comments on commit 408cc29

Please sign in to comment.