Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for IP_MULTICAST_LOOP socket option #87167

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

Abd002
Copy link
Contributor

@Abd002 Abd002 commented Mar 16, 2025

net: sockets: Add support for IP_MULTICAST_LOOP socket option

This PR adds support for the IP_MULTICAST_LOOP socket option,
which controls whether multicast packets are looped back to the
sending host.

Fixes: #86977
Signed-off-by: AbdElRahman Khalifa abdelrahman.5alifa@gmail.com

Copy link

Hello @Abd002, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@carlescufi
Copy link
Member

Thanks for the PR! Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request.

@carlescufi
Copy link
Member

@Abd002 you need to rebase your commits to squash them into a single one

Copy link
Collaborator

@pdgendt pdgendt left a comment

Choose a reason for hiding this comment

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

As Carles suggested, please read the contribution guidelines. I'd expect only 2 commits:

  • Introduction of the IP_MULTICAST_LOOP definition
  • Implementation for net_context

@Abd002 Abd002 force-pushed the add-ip-multicast-loop branch 3 times, most recently from 820abe6 to f5fc7fe Compare March 17, 2025 17:12
@Abd002 Abd002 force-pushed the add-ip-multicast-loop branch from f5fc7fe to e027ad4 Compare March 17, 2025 20:22
@Abd002 Abd002 force-pushed the add-ip-multicast-loop branch from e027ad4 to 72ab5fe Compare March 18, 2025 15:44
Copy link
Collaborator

@pdgendt pdgendt left a comment

Choose a reason for hiding this comment

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

I'm in favor of explicit typing.

pdgendt
pdgendt previously approved these changes Mar 21, 2025
@Abd002 Abd002 force-pushed the add-ip-multicast-loop branch 2 times, most recently from 4455dfc to 506479b Compare March 21, 2025 09:23
@Abd002 Abd002 force-pushed the add-ip-multicast-loop branch from 506479b to eee0603 Compare March 21, 2025 09:29
pdgendt
pdgendt previously approved these changes Mar 21, 2025
@pdgendt
Copy link
Collaborator

pdgendt commented Mar 21, 2025

It looks like #87338 got in first, will need to rebase this and merge ipv4 with ipv6.

@jukkar
Copy link
Member

jukkar commented Mar 21, 2025

Also please rebase the PR and squash the merge commit

@Abd002
Copy link
Contributor Author

Abd002 commented Mar 21, 2025

shouldn't i merge that to solve this conflict or what ?

@sayooj-aerlync
Copy link
Contributor

shouldn't i merge that to solve this conflict or what ?

Pull the current zephyr main branch to your fork.
It will show merge conflicts. We will have to solve them.

@Abd002 Abd002 force-pushed the add-ip-multicast-loop branch 2 times, most recently from 64ee08c to 03d9c9f Compare March 21, 2025 14:47
@Abd002 Abd002 force-pushed the add-ip-multicast-loop branch 2 times, most recently from 564582c to f8e2961 Compare March 22, 2025 13:23
Copy link
Collaborator

@pdgendt pdgendt left a comment

Choose a reason for hiding this comment

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

Thanks, few more nits

Add support for the IP_MULTICAST_LOOP socket option to control
multicast packet loopback.

Signed-off-by: AbdElRahman Khalifa <abdelrahman.5alifa@gmail.com>
@Abd002 Abd002 force-pushed the add-ip-multicast-loop branch from f8e2961 to 93cd641 Compare March 22, 2025 17:21
@Abd002 Abd002 requested review from jukkar and pdgendt March 23, 2025 09:10
Copy link
Member

@jukkar jukkar left a comment

Choose a reason for hiding this comment

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

Thanks! Looks very nice now.

@kartben kartben merged commit b117036 into zephyrproject-rtos:main Mar 24, 2025
22 checks passed
Copy link

Hi @Abd002!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

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.

Support IP_MULTICAST_LOOP socket option
8 participants