IP_MULTICAST_IF fails
On rs_preview build 14905:
The following works on Linux, but fails in WSL:
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <err.h>
#include <errno.h>
#include <stdio.h>
int main(void)
{
printf("Creating socket\n");
int s = socket(AF_INET, SOCK_DGRAM, 0);
if (s < 0)
err(1, "%d", errno);
ip_mreqn opt = { .imr_multiaddr = { .s_addr = 0 },
.imr_address = { .s_addr = 0 },
.imr_ifindex = 0 };
if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &opt, sizeof(opt)) != 0)
err(1, "%d", errno);
printf("Success!\n");
return 0;
}
.NET Core has support for setting the multicast interface by either address or interface index, so this impacts .NET Core functionality.
Thanks @ericeil for reporting this. We already have a task tracking the work required for supporting 'IP_MULTICAST_IF'. We don't have an ETA at the moment.
I would like to bump this as well - running into exactly this issue running https://github.com/UltraMessaging
@ankitkk Don't worry, @ericeil is a Microsoft developer who is developing .net core. This is probably already a priority.
@sunilmut Is there anything new about this one. Thanks for the hard work.
@makpac - Apologize for the delayed response.
Is there anything new about this one.
No, not yet. It's in the pending list. Just curious, is this blocking any scenario for you?
@sunilmut, I tried to install and run a server app which use multicast to talk to its clients and it sets IP_MULTICAST_IF as a socket option. It's not a blocking me as ended up installing it on a VM but being able to run the app on the same machine and without using VMs would be super cool. :)
Just an update that support for IP_MULTICAST_IF and IPV6_MULTICAST_IF has been checked in the dev branch and should soon make it to the release branch.
Hello All,
I am unable to enable multicast when running ifconfig eth2 multicast on insider preview build 16170.
@sunilmut, when you say it has been checked in the dev branch, do you refer to this branch or one that has not been released yet ?
Thank you.
@bbidault2 - Yes. If you keep an eye out on our release notes, we usually publish what's available in an Insider build. We are a bit slow in getting the release notes out for this release, will have it out soon. Apologize for the delay.
Regarding the support for 'IP_MULTICAST_IF', it should come out soon.
Thanks for trying WSL!
Here is the release note for build 16170. Thanks @jackchammons
This should be fixed in Insider build 16176.