Skip to content

Groupcast: IANA address corrected.#71641

Draft
rcasallas-silabs wants to merge 1 commit intoproject-chip:masterfrom
rcasallas-silabs:bugfix/groupcast_well_known_address
Draft

Groupcast: IANA address corrected.#71641
rcasallas-silabs wants to merge 1 commit intoproject-chip:masterfrom
rcasallas-silabs:bugfix/groupcast_well_known_address

Conversation

@rcasallas-silabs
Copy link
Copy Markdown
Contributor

@rcasallas-silabs rcasallas-silabs commented Apr 17, 2026

Summary

The Groupcast address is wrong, the correct value is FF05::FA.

Related issues

Issue #71631: Groupcast in chip SDK is using IANA address wrong.

Testing

UNTESTED

Readability checklist

The checklist below will help the reviewer finish PR review in time and keep the
code readable:

  • PR title is
    descriptive
  • Apply the
    “When in Rome…”
    rule (coding style)
  • PR size is short
  • Try to avoid "squashing" and "force-update" in commit history
  • CI time didn't increase

See: Pull Request Guidelines

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new static method, MakeIPv6WellKnownMulticast, to the IPAddress class for constructing the ff05::fa multicast address and updates PeerAddress::Groupcast to use it. Feedback identifies a missing type initialization for the IPAddress object, which is required for SDK validity, and suggests simplifying the implementation by removing redundant htonl(0) calls and unnecessary literal suffixes.

Comment thread src/inet/IPAddress.cpp
Comment on lines +497 to +505
IPAddress IPAddress::MakeIPv6WellKnownMulticast()
{
IPAddress addr;
addr.Addr[0] = htonl(0xFF050000ul);
addr.Addr[1] = htonl(0);
addr.Addr[2] = htonl(0);
addr.Addr[3] = htonl(0xFAul);
return addr;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The IPAddress object addr is not initialized with a type. In the CHIP SDK, IPAddress objects must have their Type field set (e.g., to IPAddressType::kIPv6) to be valid for operations like comparison or string conversion. Additionally, the implementation can be simplified by removing redundant htonl(0) calls. Note that unnecessary type suffixes (e.g., 'U' for unsigned) should be avoided for literals to improve readability.

IPAddress IPAddress::MakeIPv6WellKnownMulticast()
{
    IPAddress addr;
    addr.Type = IPAddressType::kIPv6;
    addr.Addr[0] = htonl(0xFF050000);
    addr.Addr[1] = 0;
    addr.Addr[2] = 0;
    addr.Addr[3] = htonl(0xFA);
    return addr;
}
References
  1. Avoid adding unnecessary type suffixes (e.g., 'u' for unsigned) to literals if they are not strictly required by the compiler or a macro and could hinder readability.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 17, 2026

PR #71641: Size comparison from 5f28762 to 086d57f

Full report (34 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 5f28762 086d57f change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1090528 1090560 32 0.0
RAM 144850 144850 0 0.0
bl616 lighting-app bl616+thread FLASH 1102012 1102012 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1588900 1588932 32 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1053702 1053702 0 0.0
RAM 108461 108461 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 892400 892400 0 0.0
RAM 105852 105852 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 775896 775888 -8 -0.0
RAM 103420 103420 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 788132 788124 -8 -0.0
RAM 108604 108604 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 735532 735524 -8 -0.0
RAM 97444 97444 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 717916 717908 -8 -0.0
RAM 97572 97572 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 560890 560906 16 0.0
RAM 204616 204616 0 0.0
lock CC3235SF_LAUNCHXL FLASH 592794 592810 16 0.0
RAM 204824 204824 0 0.0
efr32 lock-app BRD4187C FLASH 992648 992648 0 0.0
RAM 131272 131272 0 0.0
BRD4338a FLASH 796433 796441 8 0.0
RAM 243380 243380 0 0.0
window-app BRD4187C FLASH 1098152 1098152 0 0.0
RAM 130312 130312 0 0.0
esp32 all-clusters-app c3devkit DRAM 98572 98572 0 0.0
FLASH 1601762 1601876 114 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 864244 864172 -72 -0.0
RAM 162233 162233 0 0.0
nxp contact mcxw71+release FLASH 740336 740344 8 0.0
RAM 67040 67040 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1714948 1714980 32 0.0
RAM 214180 214180 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1612364 1612380 16 0.0
RAM 211052 211052 0 0.0
light cy8ckit_062s2_43012 FLASH 1466940 1466956 16 0.0
RAM 197092 197092 0 0.0
lock cy8ckit_062s2_43012 FLASH 1499668 1499700 32 0.0
RAM 224828 224828 0 0.0
qpg lighting-app qpg6200+debug FLASH 842700 842700 0 0.0
RAM 127884 127884 0 0.0
lock-app qpg6200+debug FLASH 781300 781300 0 0.0
RAM 118832 118832 0 0.0
realtek light-switch-app rtl8777g FLASH 681032 681024 -8 -0.0
RAM 101632 101632 0 0.0
lighting-app rtl8777g FLASH 724832 724824 -8 -0.0
RAM 101964 101964 0 0.0
stm32 light STM32WB5MM-DK FLASH 475476 475472 -4 -0.0
RAM 141412 141412 0 0.0
telink bridge-app tl7218x FLASH 730658 730660 2 0.0
RAM 95932 95932 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 850462 850464 2 0.0
RAM 44348 44348 0 0.0
tl7218x FLASH 841868 841870 2 0.0
RAM 99736 99736 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 730460 730460 0 0.0
RAM 56012 56012 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 793686 793686 0 0.0
RAM 75188 75188 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 730382 730382 0 0.0
RAM 33492 33492 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 613268 613268 0 0.0
RAM 118404 118404 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 840002 840008 6 0.0
RAM 97444 97444 0 0.0

Comment thread src/inet/IPAddress.h
*
* @return The constructed IP address.
*/
static IPAddress MakeIPv6WellKnownMulticast();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a preference:

Suggested change
static IPAddress MakeIPv6WellKnownMulticast();
static IPAddress MakeIPv6MatterIANAMulticastAddr();

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.40%. Comparing base (5f28762) to head (086d57f).

Files with missing lines Patch % Lines
src/inet/IPAddress.cpp 0.00% 6 Missing ⚠️
src/transport/raw/PeerAddress.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #71641      +/-   ##
==========================================
- Coverage   54.40%   54.40%   -0.01%     
==========================================
  Files        1582     1582              
  Lines      108395   108398       +3     
  Branches    13384    13384              
==========================================
  Hits        58976    58976              
- Misses      49419    49422       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants