multicast-relay icon indicating copy to clipboard operation
multicast-relay copied to clipboard

Not all broadcast addresses are accepted

Open joshuaspence opened this issue 2 years ago • 0 comments

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.

joshuaspence avatar Jun 07 '22 02:06 joshuaspence