From edb827d01fb1d9ad3acca625c79b14713a8eeec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 22 Jan 2026 13:29:44 +0100 Subject: [PATCH] mrib: receive_mrt: workaround for RTL8373 queries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the following warning caused by RTl8373 sending IGMP queries without including the mandatory IPv4 Router Alert option: mrib_receive_mrt: ignoring invalid IGMP-message of type 11 from on Signed-off-by: Álvaro Fernández Rojas --- src/mrib.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/mrib.c b/src/mrib.c index bdb4493..b369e01 100644 --- a/src/mrib.c +++ b/src/mrib.c @@ -305,6 +305,22 @@ static void mrib_receive_mrt(struct uloop_fd *fd, __unused unsigned flags) uint32_t *opts = (uint32_t*)&iph[1]; bool alert = (void*)&opts[1] <= (void*)igmp && *opts == ipv4_rtr_alert; + if (!alert + && igmp->type == IGMP_HOST_MEMBERSHIP_QUERY + && (size_t) len == sizeof(*igmp) + && igmp->code == 0x64 + && iph->version == 0x4 + && iph->ihl == 0x5 + && iph->tos == 0x00 + && iph->tot_len == cpu_to_be16(28) + && iph->id == cpu_to_be16(1) + && iph->frag_off == 0x00 + && iph->ttl == 1) { + /* Workaround RTL8373 queries without Router Alert */ + L_DEBUG("%s: workaround IGMP query without Router Alert from %s on %d", + __FUNCTION__, addrbuf, ifindex); + alert = true; + } if (!alert && (igmp->type != IGMP_HOST_MEMBERSHIP_QUERY || (size_t)len > sizeof(*igmp) || igmp->code > 0)) { L_WARN("%s: ignoring invalid IGMP-message of type %x from %s on %d",