From nobody Fri Aug 11 07:52:56 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RMbcm5KMNz4mRG9; Fri, 11 Aug 2023 07:52:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RMbcm4Zsqz3LPq; Fri, 11 Aug 2023 07:52:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691740376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WyCuwGW+tAhxny2UhN+J1M47HPQQLGol+qti32t99yw=; b=rbJF8xZoIDIYNocEvdSMX1uVtvkBjh1fTbzA1+2uytNbRPZSUlx8MGwR+i5//z6lR90Ztg 5M7QFZiUKttoFEhS44yGbaT9FcLqlMGczkQP5GfuMzenewj2Cp3sgMtj7K1jdaaSu3SF7U 7pbDTmKISfTii8lwQx+AKnoKMBM5JGg3J0N8KpceAklbdqZXhW1Df3T4qQFr8xy2Byd35y xWtJFHPF3tuYdqceXRHCfCBnR8JEtS2Lo36hWppbdOt1Kbn4zl+74vfevKcagquyMMIrpn 4upKWfJHI5kQW3GF4mda8RM2hZjetTLjdjQQoknlW3t8IKdC0jT/3X7ArQsVUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691740376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WyCuwGW+tAhxny2UhN+J1M47HPQQLGol+qti32t99yw=; b=OJgwKODGAf4adG0CyOrCRSHqFFJEmmRwIjJEMKIPKC7tr3YckP8oqf6uSwya+kr0KRIU2+ Mhjrh3fMvg1x329iMlSIfUwEHjiznCOqyAdjIXILghrAEpjV7XWHaPP4FfAG0HxhLpPaQk h7hZUlKnDOHZ9jWnkjZPyRO5Y4sLMeHcwRsNJBg8tjzuafe3IFgp60hIhXFoLnBD2Ct4WV CswWNQnvDxKQ3zzE2jQ0VuVaBNRjAQfFaKeiDRbaRJm7qKgMYxpJuwbeH+lF4ow9fuB1Gm HGqKIMgXUTNO8ogdT17yY1RwLJuRiFprtx57D3qQvnEZx0TChgihxDoglFoa/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691740376; a=rsa-sha256; cv=none; b=CtkGXgjN+4UV4VGNdgU//ge9q+gT+2kRZ4TyQfQyN91tzoFkio7opN7AV2zr8w/AyI6TZs exSIBJnK7+Nmw74zssEf8Cvqh6nKCSVIS0/MtxofEpkHc+NA4k491OeaQon7nKHm2vG+Eu 3Pe8UaYaeiP6Y4+pywedUhTvbXsjP4OFt3zkxKkX42X/JMgdDdaM2iLwJEMCzXl9k3S6kg 4wbyyGhRDnXFtrOyLJdIOx2meGHAhuWFeQ71kCh7Q1cJQ1ZsHs0yaYWNM0owoNu44EbYvW a5WNZJM4RfkiJC4ktGK9tud2X04IotLfwipseVuadLLMbsn8xEW9IEANdf5J/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RMbcm3f8YzWxV; Fri, 11 Aug 2023 07:52:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37B7quu3075691; Fri, 11 Aug 2023 07:52:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37B7qupG075688; Fri, 11 Aug 2023 07:52:56 GMT (envelope-from git) Date: Fri, 11 Aug 2023 07:52:56 GMT Message-Id: <202308110752.37B7qupG075688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 580cadd6a5f0 - main - vtnet: allow IFF_ALLMULTI to be set without VIRTIO_NET_F_CTRL_RX List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 580cadd6a5f0828691ec0b94798728a1028afa33 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=580cadd6a5f0828691ec0b94798728a1028afa33 commit 580cadd6a5f0828691ec0b94798728a1028afa33 Author: Kristof Provost AuthorDate: 2023-08-08 07:15:53 +0000 Commit: Kristof Provost 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); } }