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
20 years agoI 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