Forum Discussion
Altera_Forum
Honored Contributor
20 years agoLWIP broadcast
Hello, I have set up NIOS w/LWIP as UDP client. Addresses are fixed, not using DHCP. I can send and receive okay to fixed IP addresses, but LWIP will not receive a packet when the server sets th...
Altera_Forum
Honored Contributor
16 years ago --- Quote Start --- I have developed my own patch that appears to solve the problem. In file udp.c, line 216, replace ip_addr_cmp(&(pcb->local_ip), &(iphdr->dest)))) { with ip_addr_cmp(&(pcb->local_ip), &(iphdr->dest))) || ip_addr_isbroadcast(&iphdr->dest, inp) ) { effectively adding a check for broadcast to one of the many checks of the packet control block. I am not sure this is rigorously correct, but appears to work. Comments invited. Regards, Tim --- Quote End --- Tim, please join the lwip-users mailing list and submit the problem and your proposed solution. Development on lwIP is active as a new major upgrade is in the works. You didn't mention lwIP version and you'll need to do this there. Here would have been nice too. :) https://savannah.nongnu.org/mail/?group=lwip Bill