f67f27e96b
Use recvmsg() and control messages IP_PKTINFO (Linux, OSX, Windows) or IP_ORIGDSTADDR and IP_RECVIF (RTEMS w/ libbsd) to find the index of the logical interface through which a UDP packet was received, and the destination address from the IPv4 header. Also, clear IP_MULTICAST_ALL on Linux to disable non-compliant legacy brokenness and receive only those multicasts we are interested in.