Skip to content

Commit 72455a1

Browse files
lulu-github-namemstsirkin
authored andcommitted
vdpa_sim_net: should not drop the multicast/broadcast packet
In the receive_filter(), should not drop the packet with the broadcast/multicast address. Add the check for this Signed-off-by: Cindy Lu <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Jason Wang <[email protected]>
1 parent 0b7a04a commit 72455a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/vdpa/vdpa_sim/vdpa_sim_net.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ static bool receive_filter(struct vdpasim *vdpasim, size_t len)
6262
if (len < ETH_ALEN + hdr_len)
6363
return false;
6464

65+
if (is_broadcast_ether_addr(vdpasim->buffer + hdr_len) ||
66+
is_multicast_ether_addr(vdpasim->buffer + hdr_len))
67+
return true;
6568
if (!strncmp(vdpasim->buffer + hdr_len, vio_config->mac, ETH_ALEN))
6669
return true;
6770

0 commit comments

Comments
 (0)