From 92ecef7bd31dcc40aa8954052a80dfa20530eb23 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Sat, 9 Dec 2023 11:06:38 -0300 Subject: [PATCH] Be less verbose on unkown eth types --- mongoose.c | 2 +- src/net_builtin.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mongoose.c b/mongoose.c index 02750815..56c83e09 100644 --- a/mongoose.c +++ b/mongoose.c @@ -5303,7 +5303,7 @@ static void mg_tcpip_rx(struct mg_tcpip_if *ifp, void *buf, size_t len) { rx_ip(ifp, &pkt); } else { MG_DEBUG(("Unknown eth type %x", mg_htons(pkt.eth->type))); - mg_hexdump(buf, len >= 32 ? 32 : len); + if (mg_log_level >= MG_LL_VERBOSE) mg_hexdump(buf, len >= 32 ? 32 : len); } } diff --git a/src/net_builtin.c b/src/net_builtin.c index b0e491f5..ec1d50b9 100644 --- a/src/net_builtin.c +++ b/src/net_builtin.c @@ -833,7 +833,7 @@ static void mg_tcpip_rx(struct mg_tcpip_if *ifp, void *buf, size_t len) { rx_ip(ifp, &pkt); } else { MG_DEBUG(("Unknown eth type %x", mg_htons(pkt.eth->type))); - mg_hexdump(buf, len >= 32 ? 32 : len); + if (mg_log_level >= MG_LL_VERBOSE) mg_hexdump(buf, len >= 32 ? 32 : len); } }