When a UDP broadcast is received (destination IP 255.255.255.255), the udp input function checks:
- is it a broadcast ==> yes
AND
- is the local pcb bound to INADDR_ANY?
OR
- does the destination IP match into the local IP/netmask?
So when you have bound you udp socket to a specific IP instead of INADDR_ANY, it will never receive UDP broadcasts because 2) and 3) will eval to false.
==> a third check is needed
When a UDP broadcast is received (destination IP 255.255.255.255), the udp input function checks:
AND
OR
So when you have bound you udp socket to a specific IP instead of INADDR_ANY, it will never receive UDP broadcasts because 2) and 3) will eval to false.
==> a third check is needed