udp: fix missing check

This commit is contained in:
Matheus
2025-12-08 22:49:33 -03:00
parent 57e4a39f53
commit 1a213c8441
+1 -1
View File
@@ -100,7 +100,7 @@ void udp_process(netdev_t *netdev, void *buffer, uint32_t peer) {
spinlock_acquire(&portlock);
udpsocket_t *socket = (udpsocket_t *)ports[dstport];
if (socket)
if (socket && (socket->socket.shutdown & SOCKET_SHUTDOWN_READ) == 0)
__atomic_add_fetch(&socket->packetsprocessing, 1, __ATOMIC_SEQ_CST);
spinlock_release(&portlock);