Skip to content
Commit 3ce7f89a authored by Ravi kumar Veeramally's avatar Ravi kumar Veeramally Committed by Johan Hedberg
Browse files

net: pkt: Restore pkt cursor after cloning



net_pkt_clone() initializes the original packet cursor
and clone the packet. But it doesn't restore the cursor
back to original position.

Issue noticed when mDNS resolving fails when mdns responder
is also enabled.

net_conn_input(), in case of multicast packet, connection
handler clone the packet and deliver to matching handler.

Example case: dns_resolver and mdns_responder both register
handlers for 5353 port. After first clone original packet
cursor moved back to starting position. But first cloned
packet cursor is set properly. Second time cloning makes
cursor position to set to zero. Which makes second packet
handler header unpacking goes wrong.

Fixes #21970.

Signed-off-by: default avatarRavi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
parent 573db5af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment