net: sockets: Store socket private data into its own variable
Do not try to re-use net_context.user_data field as in many places (like in accept) it is expected to contain pointer to net_context. Storing the socket flags will corrupt the value. To simplify and make things less error prone, use socket specific field in net_context to store the socket flags. Fixes #19191 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
06733d53df
commit
e98f5d37f5
3 changed files with 9 additions and 3 deletions
|
@ -257,6 +257,9 @@ struct net_context {
|
|||
#endif /* CONFIG_NET_CONTEXT_SYNC_RECV */
|
||||
|
||||
#if defined(CONFIG_NET_SOCKETS)
|
||||
/** BSD socket private data */
|
||||
void *socket_data;
|
||||
|
||||
/** Per-socket packet or connection queues */
|
||||
union {
|
||||
struct k_fifo recv_q;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue