Re: DHCP hostname not working with web_servser_nvm_mpfs example, MPLAB X (v4.15) PIC32MZ
2019/01/17 14:57:22
(permalink)
Yes, it seems to be a bug, the socket loses its binding when the interface is turned down and the socket is disconnected.
It's been fixed in the repo and it will be part of the next release.
You can apply the fix yourself in the udp.c, around line #2162 in function TCPIP_UDP_Disconnect, it reads:
if(pSkt->extFlags.serverSkt != 0)
{ // stop server connection on the remote port; new rbind needed
pSkt->remotePort = 0;
}
It should be:
if(pSkt->extFlags.serverSkt != 0 && pSkt->flags.looseRemPort != 0)
{ // stop server connection on the remote port if not specifically rbound
pSkt->remotePort = 0;
}
Please try the fix and let us know if it works for you.
Thank you for finding and reporting this.