Skip to content

mlx5/mcast: fix inet_ntop argument for IPv6 address#1294

Open
janjust wants to merge 1 commit intoopenucx:masterfrom
janjust:master-fix-inet-ntop-mcast
Open

mlx5/mcast: fix inet_ntop argument for IPv6 address#1294
janjust wants to merge 1 commit intoopenucx:masterfrom
janjust:master-fix-inet-ntop-mcast

Conversation

@janjust
Copy link
Copy Markdown
Collaborator

@janjust janjust commented Apr 9, 2026

Debug output of MLX5 TL prints garbage IPv6 addresses during the multicast initialization/teardown phase.

Pass sin6_addr field instead of the full sockaddr_in6 struct to inet_ntop(AF_INET6, ...), which expects a struct in6_addr pointer.

@janjust janjust force-pushed the master-fix-inet-ntop-mcast branch from 87af032 to 1aaf597 Compare April 9, 2026 23:57
@janjust janjust changed the title TL/MLX5/MCAST: fix inet_ntop argument for IPv6 address mlx5/mcast: fix inet_ntop argument for IPv6 address Apr 9, 2026
@janjust janjust force-pushed the master-fix-inet-ntop-mcast branch from 1aaf597 to c5f3191 Compare April 10, 2026 00:00
@janjust
Copy link
Copy Markdown
Collaborator Author

janjust commented Apr 10, 2026

/build

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 10, 2026

Greptile Summary

This PR fixes two inet_ntop(AF_INET6, ...) calls that were incorrectly passing a struct sockaddr_in6 * where a struct in6_addr * is required. Both sites now correctly pass the sin6_addr member, which eliminates the garbage IPv6 address strings in debug output during multicast join and leave operations.

Confidence Score: 5/5

Safe to merge — minimal, targeted fix with no side effects beyond correcting debug output.

Both changes are straightforward and correct: inet_ntop(AF_INET6, ...) requires a struct in6_addr *, and the fix supplies exactly that. The third inet_ntop call in the file (line 257) already passes a raw byte array which is correct. No logic, data flow, or error handling is affected.

No files require special attention.

Important Files Changed

Filename Overview
src/components/tl/mlx5/mcast/tl_mlx5_mcast_helper.c Fixes two incorrect inet_ntop calls by passing sin6_addr field instead of the full sockaddr_in6 struct, correcting garbage IPv6 debug output.

Reviews (2): Last reviewed commit: "MLX5: fix inet_ntop mcast addr pointer t..." | Re-trigger Greptile

Pass sin6_addr field instead of the full sockaddr_in6 struct to
inet_ntop(AF_INET6, ...), which expects a struct in6_addr pointer.

Signed-off-by: Tomislav Janjusic <tomislavj@nvidia.com>
@janjust janjust force-pushed the master-fix-inet-ntop-mcast branch from c5f3191 to 409ba7a Compare April 13, 2026 13:33
@janjust
Copy link
Copy Markdown
Collaborator Author

janjust commented Apr 13, 2026

/build

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant