STM32H743 lwip netconn_recv netbuf overwritten from browser broadcast message.
I have a project on a STM32H743-Nucleo-board based on the STM32CubeH7 repository project with a custom tcp server application running. So far I assumed that, when using netconn_recv(), the netbuf data are valid until the next netconn_recv() command. But sometimes it happens that an incoming BROWSER protocol broadcast message overwrites my rxbuffer and my application ends up with an error message, due to the corrupt data in the rxbuffer. The error dos not occur, when I have wireshark running on the PC. But I can see artifacts of the broadcast message in the rx buffer when inspecting with the debugger.
My server loop is quite simple
while (running) {
errRet = netconn_recv(current_conn, &rxbuf);
if (errRet != ERR_OK) {
break;
}
do {
netbuf_data(rxbuf, (void*) &rxdata, &rxlen);
if (netconn_receive (current_conn, rxdata, rxlen) != ERR_OK)
break;
} while (netbuf_next(rxbuf) >= 0);
}I enabled the stack and heap overflow hook function, but there seems all ok.
