-
I am writing an application that uses a raw "packet" socket for the primary Zephyr interface. This raw socket exposes the L2 and L3 headers of the packet. The read portion of this is working well. I will be using the same raw socket for both the read and write to the primary iface. My question has to do with the /zephyr/samples/net/sockets/packet example for the write to the socket. In this example, 2 raw sockets are opened to the same iface, and that is a difference between what I intend to do, where I will use the same socket for both read and write. But when a write to the socket occurs, why is the following read-back required to prevent an IP stack memory leak? Can someone explain to me why this is true, and if it will be necessary when the read and write raw socket is the same singular handle? This code sample is from the send_packet_socket() method:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It is explained in the commit 6d7f4e0, see also some discussion on #34865 |
Beta Was this translation helpful? Give feedback.
It is explained in the commit 6d7f4e0, see also some discussion on #34865