Bug 202484 - vtnet drivers didn't support being use for multicast routing (MRT_ADD_VIF)
Summary: vtnet drivers didn't support being use for multicast routing (MRT_ADD_VIF)
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-net mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-19 14:58 UTC by olivier
Modified: 2015-12-11 08:46 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description olivier 2015-08-19 14:58:25 UTC
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).
Comment 1 olivier 2015-12-10 22:02:17 UTC
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 ?
Comment 2 Andrey V. Elsukov freebsd_committer 2015-12-11 08:18:55 UTC
(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().
Comment 3 olivier 2015-12-11 08:46:34 UTC
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 ?