[Bug 295176] if_rge: IPv6 and multicast filtering issues
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 11 Jul 2026 15:40:12 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295176
Oleg <oleglelchuk@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oleglelchuk@gmail.com
--- Comment #1 from Oleg <oleglelchuk@gmail.com> ---
I can reproduce what appears to be the same multicast-filter problem on an
RTL8125 using rge(4) on FreeBSD 16-CURRENT.
My rge0 machine is directly connected to another FreeBSD machine. If I reboot
only the rge0 machine, IPv6 Neighbor Discovery may work normally. If I reboot
both machines, they often cannot discover each other. Sending pings does not
help, but this immediately restores NDP:
ifconfig rge0 allmulti
That boot-order dependence suggested that IPv6 multicast memberships are
being
added after rge0 is already running, without the hardware multicast filter
being
refreshed.
I believe there is a one-line bug in rge_ioctl(). The
SIOCADDMULTI/SIOCDELMULTI
handler checks IFF_DRV_RUNNING using if_getflags(), but IFF_DRV_RUNNING
belongs
to the interface driver flags, not the ordinary interface flags. As a result,
rge_iff_locked() is not called when IPv6 adds or removes multicast
memberships.
Proposed fix:
diff --git a/sys/dev/rge/if_rge.c b/sys/dev/rge/if_rge.c
--- a/sys/dev/rge/if_rge.c
+++ b/sys/dev/rge/if_rge.c
@@
case SIOCADDMULTI:
case SIOCDELMULTI:
RGE_LOCK(sc);
- if ((if_getflags(ifp) & IFF_DRV_RUNNING) != 0)
+ if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0)
rge_iff_locked(sc);
RGE_UNLOCK(sc);
break;
This matches the form used by other FreeBSD Ethernet drivers. It also
explains
why promisc/allmulti masks the problem: both modes force the rge hardware to
accept all multicast frames, including Router Advertisements and Neighbor
Discovery traffic.
--
You are receiving this mail because:
You are the assignee for the bug.