Date: Sat, 8 Aug 2026 09:08:04 +0100 From: Bruce Simpson <bms@FreeBSD.org> To: Kevin Bowling <kbowling@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: 8f6561e8adbd - stable/15 - ixv: fix multicast address enumeration Message-ID: <57daffd7-3a4b-40dc-80fb-945851929412@FreeBSD.org> In-Reply-To: <6a767a79.3dae1.16b03095@gitrepo.freebsd.org>
index | next in thread | previous in thread | raw e-mail
Somewhat related: I'm concerned that ifmcstat(8) may not be reporting AF_LINK memberships in all cases, only the ones which were plumbed there by an upper layer (AF_INET, AF_INET6). I noticed this when preparing "add that which was never ratified" for IPv6 sockets. It's a potential issue for LLDP, Carrier Ethernet and IS-IS bring-up. Has anyone else observed this? Is anyone else actively using it, or using FreeBSD for these control plane protocols? It may be a "bms@ ends up having to fix it again" issue because I merged ifmcstat(8) from NetBSD originally. #tragedyofthecommons On 08/08/2026 01:38, Kevin Bowling wrote: > The branch stable/15 has been updated by kbowling: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8f6561e8adbd07f52278b5a404c72d5c9643b471 > > commit 8f6561e8adbd07f52278b5a404c72d5c9643b471 > Author: Kevin Bowling <kbowling@FreeBSD.org> > AuthorDate: 2026-07-28 11:06:23 +0000 > Commit: Kevin Bowling <kbowling@FreeBSD.org> > CommitDate: 2026-08-08 00:34:24 +0000 > > ixv: fix multicast address enumeration > > if_foreach_llmaddr() adds each callback return value to its running > count. Returning the incremented count made the address indices grow > as 0, 1, 3, 7, and so on, eventually writing beyond the multicast > address array. > > Return one address per callback and stop copying when the array is > full, matching the ixv-1.6.12 driver. > > Fixes: ff06a8dbb677 ("Mechanically convert ixgbe(4) to IfAPI") > > (cherry picked from commit 6020de5ad154d54c8b9a838f28612c2182330c67) > --- > sys/dev/ixgbe/if_ixv.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c > index 8a1c1aae041d..24e6fa714a7b 100644 > --- a/sys/dev/ixgbe/if_ixv.c > +++ b/sys/dev/ixgbe/if_ixv.c > @@ -842,11 +842,14 @@ ixv_negotiate_api(struct ixgbe_softc *sc) > static u_int > ixv_if_multi_set_cb(void *cb_arg, struct sockaddr_dl *addr, u_int cnt) > { > + if (cnt >= MAX_NUM_MULTICAST_ADDRESSES) > + return (0); > + > bcopy(LLADDR(addr), > &((u8 *)cb_arg)[cnt * IXGBE_ETH_LENGTH_OF_ADDRESS], > IXGBE_ETH_LENGTH_OF_ADDRESS); > > - return (++cnt); > + return (1); > } > > /************************************************************************ > @@ -1982,4 +1985,3 @@ ixv_init_device_features(struct ixgbe_softc *sc) > if (sc->feat_cap & IXGBE_FEATURE_NEEDS_CTXD) > sc->feat_en |= IXGBE_FEATURE_NEEDS_CTXD; > } /* ixv_init_device_features */ > - >home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?57daffd7-3a4b-40dc-80fb-945851929412>
