* [PATCH] vdpa_sim_net: should not drop the multicast/broadcast packet
@ 2022-12-14 5:43 Cindy Lu
2022-12-14 6:07 ` Jason Wang
0 siblings, 1 reply; 2+ messages in thread
From: Cindy Lu @ 2022-12-14 5:43 UTC (permalink / raw)
To: mst, jasowang, lulu, virtualization, linux-kernel
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>
---
drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
index c3cb225ea469..0f4739c31eea 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
@@ -62,6 +62,9 @@ static bool receive_filter(struct vdpasim *vdpasim, size_t len)
if (len < ETH_ALEN + hdr_len)
return false;
+ if (is_broadcast_ether_addr(vdpasim->buffer + hdr_len) ||
+ is_multicast_ether_addr(vdpasim->buffer + hdr_len))
+ return true;
if (!strncmp(vdpasim->buffer + hdr_len, vio_config->mac, ETH_ALEN))
return true;
--
2.34.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] vdpa_sim_net: should not drop the multicast/broadcast packet
2022-12-14 5:43 [PATCH] vdpa_sim_net: should not drop the multicast/broadcast packet Cindy Lu
@ 2022-12-14 6:07 ` Jason Wang
0 siblings, 0 replies; 2+ messages in thread
From: Jason Wang @ 2022-12-14 6:07 UTC (permalink / raw)
To: Cindy Lu; +Cc: mst, virtualization, linux-kernel
On Wed, Dec 14, 2022 at 1:43 PM Cindy Lu <lulu@redhat.com> wrote:
>
> 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>
Acked-by: Jason Wang <jasowang@redhat.com>
Thanks
> ---
> drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
> index c3cb225ea469..0f4739c31eea 100644
> --- a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
> +++ b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
> @@ -62,6 +62,9 @@ static bool receive_filter(struct vdpasim *vdpasim, size_t len)
> if (len < ETH_ALEN + hdr_len)
> return false;
>
> + if (is_broadcast_ether_addr(vdpasim->buffer + hdr_len) ||
> + is_multicast_ether_addr(vdpasim->buffer + hdr_len))
> + return true;
> if (!strncmp(vdpasim->buffer + hdr_len, vio_config->mac, ETH_ALEN))
> return true;
>
> --
> 2.34.3
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-14 6:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14 5:43 [PATCH] vdpa_sim_net: should not drop the multicast/broadcast packet Cindy Lu
2022-12-14 6:07 ` Jason Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®