Skip to content

Commit 72455a1

Browse files
Cindy Lumstsirkin
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 <lulu@redhat.com> Message-Id: <20221214054306.24145-1-lulu@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
1 parent 0b7a04a commit 72455a1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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)