From efb9d448fb7b1ffb09902d69cdc5bdec77ee9d07 Mon Sep 17 00:00:00 2001 From: Old-Ding <35417409+Old-Ding@users.noreply.github.com> Date: Mon, 6 Jul 2026 09:31:08 +0800 Subject: [PATCH] bsp: zynqmp-r5: Fix IGMP multicast range check Reject IPv4 addresses outside 224.0.0.0/4 before updating the multicast MAC hash. The previous condition used AND, so it could never reject a non-multicast first octet. Generated-by: OpenAI Codex Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com> --- .../drivers/Zynq_HAL_Driver/xemacpsif/xemacpsif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xemacpsif/xemacpsif.c b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xemacpsif/xemacpsif.c index 0ac650c5e6d..7a96137a749 100644 --- a/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xemacpsif/xemacpsif.c +++ b/bsp/zynqmp-r5-axu4ev/drivers/Zynq_HAL_Driver/xemacpsif/xemacpsif.c @@ -632,7 +632,7 @@ static err_t xemacpsif_mac_filter_update (struct netif *netif, ip_addr_t *group, unsigned int i; u8_t * ip_addr = (u8_t *) group; - if ((ip_addr[0] < 224) && (ip_addr[0] > 239)) { + if ((ip_addr[0] < 224) || (ip_addr[0] > 239)) { LWIP_DEBUGF(NETIF_DEBUG, ("%s: The requested MAC address is not a multicast address.\r\n", __func__)); LWIP_DEBUGF(NETIF_DEBUG,