summaryrefslogtreecommitdiff
path: root/fw/esp32/components/eos
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2024-09-04 20:46:44 +0200
committerUros Majstorovic <majstor@majstor.org>2024-09-04 20:46:44 +0200
commit1498495768677132a83889d0dd064563a0c0ea03 (patch)
treeedd81452c15ad41f16e696cb4380df22d01868ac /fw/esp32/components/eos
parentafd07f4bc007ddf4a9e036cd9f4c2db800719653 (diff)
network buffer fix
Diffstat (limited to 'fw/esp32/components/eos')
-rw-r--r--fw/esp32/components/eos/rng.c2
-rw-r--r--fw/esp32/components/eos/sock.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/fw/esp32/components/eos/rng.c b/fw/esp32/components/eos/rng.c
index ca9e051..3927df1 100644
--- a/fw/esp32/components/eos/rng.c
+++ b/fw/esp32/components/eos/rng.c
@@ -14,7 +14,7 @@ static void rng_handler(unsigned char _mtype, unsigned char *buffer, uint16_t bu
rng_len = (uint16_t)buffer[0] << 8;
rng_len |= (uint16_t)buffer[1];
- if (rng_len > EOS_NET_MTU) {
+ if (rng_len > EOS_NET_SIZE_BUF) {
rng_len = 0;
goto rng_handler_fin;
}
diff --git a/fw/esp32/components/eos/sock.c b/fw/esp32/components/eos/sock.c
index e1b703f..08d95d5 100644
--- a/fw/esp32/components/eos/sock.c
+++ b/fw/esp32/components/eos/sock.c
@@ -84,7 +84,7 @@ static void udp_rcvr_task(void *pvParameters) {
ssize_t rv;
buf = eos_net_alloc();
- rv = t_recvfrom(sock, buf + EOS_SOCK_SIZE_UDP_HDR, EOS_NET_MTU - EOS_SOCK_SIZE_UDP_HDR, &addr);
+ rv = t_recvfrom(sock, buf + EOS_SOCK_SIZE_UDP_HDR, EOS_NET_SIZE_BUF - EOS_SOCK_SIZE_UDP_HDR, &addr);
if (rv < 0) {
eos_net_free(buf);
ESP_LOGE(TAG, "UDP RECV ERR:%d", rv);