The branch main has been updated by kp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=580cadd6a5f0828691ec0b94798728a1028afa33

commit 580cadd6a5f0828691ec0b94798728a1028afa33
Author:     Kristof Provost <k...@freebsd.org>
AuthorDate: 2023-08-08 07:15:53 +0000
Commit:     Kristof Provost <k...@freebsd.org>
CommitDate: 2023-08-11 07:42:29 +0000

    vtnet: allow IFF_ALLMULTI to be set without VIRTIO_NET_F_CTRL_RX
    
    If the host doesn't announce VIRTIO_NET_F_CTRL_RX we cannot disable all
    multicast traffic. Previously we'd refuse to set the IFF_ALLMULTI flag,
    which is the exact opposite of what is actually happening.
    
    This broke things such as igmpproxy.
    
    See also:       https://redmine.pfsense.org/issues/14301
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D41356
---
 sys/dev/virtio/network/if_vtnet.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys/dev/virtio/network/if_vtnet.c 
b/sys/dev/virtio/network/if_vtnet.c
index 359ef0c423bb..82f7c6a47589 100644
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -1299,8 +1299,11 @@ vtnet_ioctl_ifflags(struct vtnet_softc *sc)
                if (sc->vtnet_flags & VTNET_FLAG_CTRL_RX)
                        vtnet_rx_filter(sc);
                else {
-                       if ((if_getflags(ifp) ^ sc->vtnet_if_flags) & 
IFF_ALLMULTI)
-                               return (ENOTSUP);
+                       /*
+                        * We don't support filtering out multicast, so
+                        * ALLMULTI is always set.
+                        */
+                       if_setflagbits(ifp, IFF_ALLMULTI, 0);
                        if_setflagbits(ifp, IFF_PROMISC, 0);
                }
        }

Reply via email to