Page MenuHomeFreeBSD

MLD group state string conversion fix
ClosedPublic

Authored by sebastien.bini_stormshield.eu on Aug 23 2022, 1:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 7:03 AM
Unknown Object (File)
Apr 7 2024, 10:58 PM
Unknown Object (File)
Apr 7 2024, 1:19 PM
Unknown Object (File)
Dec 20 2023, 4:44 AM
Unknown Object (File)
Dec 12 2023, 6:49 PM
Unknown Object (File)
Dec 8 2023, 3:42 AM
Unknown Object (File)
Nov 1 2023, 1:31 PM
Unknown Object (File)
Sep 26 2023, 6:17 AM

Details

Summary

The ipv6 MLD group state string conversion function is broken (only used if KTR is turned on).

This merely adds the missing entry, to comply with the enum described on sys/netinet6/mld6_var.h:43:

/*
 * MLD per-group states.
 */
#define MLD_NOT_MEMBER			0 /* Can garbage collect group */
#define MLD_SILENT_MEMBER		1 /* Do not perform MLD for group */
#define MLD_REPORTING_MEMBER		2 /* MLDv1 we are reporter */
#define MLD_IDLE_MEMBER			3 /* MLDv1 we reported last */
#define MLD_LAZY_MEMBER			4 /* MLDv1 other member reporting */
#define MLD_SLEEPING_MEMBER		5 /* MLDv1 start query response */
#define MLD_AWAKENING_MEMBER		6 /* MLDv1 group timer will start */
#define MLD_G_QUERY_PENDING_MEMBER	7 /* MLDv2 group query pending */
#define MLD_SG_QUERY_PENDING_MEMBER	8 /* MLDv2 source query pending */
#define MLD_LEAVING_MEMBER		9 /* MLDv2 dying gasp (pending last */
					  /* retransmission of INCLUDE {}) */

I first noticed the issue on a FreeBSD 13.1.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sebastien.bini_stormshield.eu retitled this revision from The ipv6 MLD group state string conversion function is broken (only used if KTR is turned on). to MLD group state string conversion fix.Aug 23 2022, 1:59 PM
sebastien.bini_stormshield.eu edited the summary of this revision. (Show Details)
emaste added inline comments.
sys/netinet6/in6_mcast.c
2866

Maybe == MLD_LEAVING_MEMBER - MLD_NOT_MEMBER + 1?

sys/netinet6/in6_mcast.c
2866

Could do. I am not so sure of the usefulness of this static assertion (won't break if a new entry is added, and won't run unless KTR is on).

At least in your version the boundaries will appear in a text search ¯\_(ツ)_/¯

emaste added inline comments.
sys/netinet6/in6_mcast.c
2866

Indeed - I was thinking about suggesting it just be removed instead. Neither version would catch a new entry at the end of the list, but I think it's still fine to add

This revision is now accepted and ready to land.Aug 23 2022, 2:52 PM

Can you confirm Sébastien BINI <sebastien.bini@stormshield.eu> as the git author info?

This revision was automatically updated to reflect the committed changes.