setsockopt(IP_MULTICAST_IF) fails with WSAEADDRNOTAVAIL if Ethernet port was never connected

Heesterman, Peter J 1 Reputation point
2020-12-17T10:16:34.777+00:00

I am setting multicast to operate over a specific net port.
(The PC has more than one.)

The port is configured with a static IP address, which is correctly passed to the setsockopt function.

This works correctly if the port has been physically connected at any time since the PC booted.

However, if the network port was never physically connected (after boot) it fails with error 10049 (WSAEADDRNOTAVAIL).

Is this the intended behaviour?

Windows for business | Windows Client for IT Pros | Devices and deployment | Other
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.