• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From defef8f57ee35b510c4a542e54237f664ac31d5d Mon Sep 17 00:00:00 2001
2From: root <wuchangye@huawei.com>
3Date: Sat, 9 Dec 2023 16:54:47 +0800
4Subject: [PATCH] fix the coredump issue when UDP traffic is sent
5
6---
7 src/api/sockets.c | 6 ++++++
8 1 file changed, 6 insertions(+)
9
10diff --git a/src/api/sockets.c b/src/api/sockets.c
11index d488b5b..a9d39ae 100644
12--- a/src/api/sockets.c
13+++ b/src/api/sockets.c
14@@ -1865,7 +1865,13 @@ lwip_sendto(int s, const void *data, size_t size, int flags,
15     } else
16 #endif /* LWIP_CHECKSUM_ON_COPY */
17     {
18+#if GAZELLE_ENABLE
19+      /* In the gazelle scenario, the payload is stored in send_ring,
20+         and the payload stores the sock pointer information. */
21+      buf.p->payload = (void *)sock;
22+#else
23       MEMCPY(buf.p->payload, data, short_size);
24+#endif
25     }
26     err = ERR_OK;
27   }
28--
292.30.0
30
31