31 lines
846 B
Diff
31 lines
846 B
Diff
From defef8f57ee35b510c4a542e54237f664ac31d5d Mon Sep 17 00:00:00 2001
|
|
From: root <wuchangye@huawei.com>
|
|
Date: Sat, 9 Dec 2023 16:54:47 +0800
|
|
Subject: [PATCH] fix the coredump issue when UDP traffic is sent
|
|
|
|
---
|
|
src/api/sockets.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/src/api/sockets.c b/src/api/sockets.c
|
|
index d488b5b..a9d39ae 100644
|
|
--- a/src/api/sockets.c
|
|
+++ b/src/api/sockets.c
|
|
@@ -1865,7 +1865,13 @@ lwip_sendto(int s, const void *data, size_t size, int flags,
|
|
} else
|
|
#endif /* LWIP_CHECKSUM_ON_COPY */
|
|
{
|
|
+#if GAZELLE_ENABLE
|
|
+ /* In the gazelle scenario, the payload is stored in send_ring,
|
|
+ and the payload stores the sock pointer information. */
|
|
+ buf.p->payload = (void *)sock;
|
|
+#else
|
|
MEMCPY(buf.p->payload, data, short_size);
|
|
+#endif
|
|
}
|
|
err = ERR_OK;
|
|
}
|
|
--
|
|
2.30.0
|
|
|