I am trying to relay broadcasts to 192.168.1.255 but these are rejected because the code is only allowing 255.255.255.255 as the broadcast address. According to Wikipedia:
The broadcast address for any IPv4 host can be obtained by taking the bit complement (bitwise NOT) of the subnet mask and then performing a bitwise OR operation with the host's IP address. A shortcut to this process (for common masks using only 0 and 1 bit placements) is to simply take the host's IP address and set all bits in the host identifier portion of the address (any bit positions which hold a 0 in the subnet mask) to 1.
I am trying to relay broadcasts to 192.168.1.255 but these are rejected because the code is only allowing 255.255.255.255 as the broadcast address. According to Wikipedia: