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

net: conn: Deliver multicast pkt to all interested parties #18797

Merged
merged 2 commits into from
Sep 12, 2019

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Aug 30, 2019

If we receive a multicast IPv4 or IPv6 packet, then we need to
deliver it to all sockets that have installed a handler for it.

Signed-off-by: Jukka Rissanen jukka.rissanen@linux.intel.com

If we receive a multicast IPv4 or IPv6 packet, then we need to
deliver it to all sockets that have installed a handler for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
NET_DBG("[%p] mcast match found cb %p ud %p",
conn, conn->cb, conn->user_data);

mcast_pkt = net_pkt_clone(pkt, CLONE_TIMEOUT);
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we could do a shallow clone here?
It would save some memory but it's also risky that a receiver would change something in the pkt.

Copy link
Member Author

Choose a reason for hiding this comment

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

As we cannot guarantee that the apps won't modify the data, the net_buf needs to be cloned too.

Test requires more network buffers to work properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
@zephyrbot zephyrbot added the area: Tests Issues related to a particular existing or missing test label Aug 30, 2019
@jukkar jukkar merged commit f6c5ea6 into zephyrproject-rtos:master Sep 12, 2019
@jukkar jukkar deleted the multiple-multicast-listeners branch September 12, 2019 14:33
@backporting
Copy link

backporting bot commented Sep 12, 2019

The backport to v1.14-branch failed:

Commits ["d8dc5446174ac9540d0723e847a6c32218465b34","c004bf735b84ab7e1195153c65df57c0072969ff"] could not be cherry-picked on top of v1.14-branch

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport v1.14-branch
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick d8dc5446174ac9540d0723e847a6c32218465b34 c004bf735b84ab7e1195153c65df57c0072969ff
# Create a new branch with these backported commits.
git checkout -b backport-18797-to-v1.14-branch
# Push it to GitHub.
git push --set-upstream origin backport-18797-to-v1.14-branch
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

Then, create a pull request where the base branch is v1.14-branch and the compare/head branch is backport-18797-to-v1.14-branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking area: Tests Issues related to a particular existing or missing test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants