I have a very strange problem where my application stops receiving network packets if a certain UDP packet is sent and received. What makes this very perplexing is that the application must be running for 2 hours before the failure occurs. It works fine any time before that.
udp_open() and udp_extopen(), have a command saying that a specific local port can not be used for unicast and multicast communications. This is something I am doing and it seems to work fine. When I changed the local Unicast port, it still failed in the same way.
The basic sequence of network calls is this:
udp_extopen(&unisock, IF_ETH0, VDU_CMD_PORT, -1, 0, commandif_handler, 0, 0);
ip = inet_addr(VDU_CMD_MCAST_IP);
udp_extopen(&sock, IF_ETH0, VDU_CMD_PORT, ip, 0, commandif_handler,0, 0);
// Later a button is pressed
udp_sendto(&unisock, &msg, 14, ip, port);
// The replay is received on unisock
// After the 2 hour mark, the IP stack stalls
Any thoughts about what this could are appreciated.