qcacmn: Fix failing to drop m-pkts from the DUT itself
The DUT should drop the mcast packet from itself when receiving it. However, a mcast packet from the DUT itself has been failed to be discarded due to code refactoring. This change aims at fixing this issue. Change-Id: Ic80aa2aeb107b7b5a1b1d88f2ee0a72e316d7fcc CRs-Fixed: 3372169
This commit is contained in:
committed by
Madan Koyyalamudi
parent
1e4a1adb96
commit
2c76bff9c5
@@ -2535,13 +2535,15 @@ qdf_export_symbol(__qdf_nbuf_is_bcast_pkt);
|
|||||||
|
|
||||||
bool __qdf_nbuf_is_mcast_replay(qdf_nbuf_t nbuf)
|
bool __qdf_nbuf_is_mcast_replay(qdf_nbuf_t nbuf)
|
||||||
{
|
{
|
||||||
struct ethhdr *eh = (struct ethhdr *)qdf_nbuf_data(nbuf);
|
struct sk_buff *skb = (struct sk_buff *)nbuf;
|
||||||
|
struct ethhdr *eth = eth_hdr(skb);
|
||||||
|
|
||||||
|
if (qdf_likely(skb->pkt_type != PACKET_MULTICAST))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (qdf_unlikely(ether_addr_equal(eth->h_source, skb->dev->dev_addr)))
|
||||||
|
return true;
|
||||||
|
|
||||||
if (unlikely(nbuf->pkt_type == PACKET_MULTICAST)) {
|
|
||||||
if (unlikely(ether_addr_equal(eh->h_source,
|
|
||||||
nbuf->dev->dev_addr)))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user