Trying to enable a multicast routing daemon (net/pimd) on a VM using vtnet, it failed with this error message: [root@router]~# service pimd start Starting pimd. pimd: 16:53:33.162 Failed adding VIF 0 (MRT_ADD_VIF) for iface vtnet0:(error 45): Operation not supported Aug 19 16:53:33 router pimd[1839]: Failed adding VIF 0 (MRT_ADD_VIF) for iface vtnet0: Operation not supported /usr/local/etc/rc.d/pimd: WARNING: failed to start pimd There is no problem with Virtualbox and em(4) drivers, but only with vtnet(4).
errno(2) translate error number 45 by a EOPNOTSUPP. And code in netinet/ip_mroute.c can return EOPNOTSUPP in 2 cases: if ((vifcp->vifc_flags & VIFF_TUNNEL) != 0) { CTR1(KTR_IPMF, "%s: tunnels are no longer supported", __func__); VIF_UNLOCK(); return EOPNOTSUPP; or } else { /* Make sure the interface supports multicast */ if ((ifp->if_flags & IFF_MULTICAST) == 0) { VIF_UNLOCK(); return EOPNOTSUPP; But a vtnet interface seems to correctly set IFF_MULTICAST because dev/virtio/network/if_vtnet.c includes: vtnet_setup_interface(struct vtnet_softc *sc) { ... ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ... } Then how to troubleshoot deeper this problem ?
(In reply to olivier from comment #1) > errno(2) translate error number 45 by a EOPNOTSUPP. > > And code in netinet/ip_mroute.c can return EOPNOTSUPP in 2 cases: You forgot about "return (error)" and "return (some_func())" :) I guess you receive this error from if_allmulti()->vtnet_ioctl().
I beleive I've found the source of the problem in this message: https://lists.freebsd.org/pipermail/svn-src-head/2014-January/055007.html "It also does not handle multicast filter configuration when VTNET_FLAG_CTRL_RX flag is not set. If vtnet(4) does not support multicast filter, it shouldn't announce IFF_MULTICAST. I wonder how vtnet(4) can work with carp(4) given that its multicast handling is ignored." If I understand correctly: Multicast support is totaly missing on the vtnet drivers ?