-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
net: conn: Deliver multicast pkt to all interested parties #18797
Conversation
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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>
The backport to
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 |
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