From nobody Fri Sep 20 11:40:05 2024 X-Original-To: dev-commits-src-all@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 4X99RV082Sz5Wf22; Fri, 20 Sep 2024 11:40:06 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X99RT3msZz4lj8; Fri, 20 Sep 2024 11:40:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726832405; 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=frMqBPnm2spisBdfFhsrcmHLvMtezzPjINndkGLJxGo=; b=g7sr98qpckGK4LW/s48RWW1PS0lyKu81vve202+DxCpT1gYrxqF+7CdQJqLM5t9wJnaRsS zqZ39ufPVVFknPFNlnaNtiCxufFgmwG7/qgiE/XEpLfpQS+OWh3dBzLP+Wt1Te3B0mB1RX Q6DPYNaGKZrD0sZZeIjGkpbXh6JrqH52Eu708e+OEu+bPQIk4jiNX6JXodr7wC7Vb4H9nt Ww42l4pBPhdMu4hUozcpe+D267dB3sJ7ljrC+vbJ00RPmYV6T2oTB0BVwyBEHVUmDu00aF tpz7QFWiZisDtd2alAXaoumxppk1WhZ5UZ1cJJ9/dfjipdktKVCUhohLOMieUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726832405; a=rsa-sha256; cv=none; b=hf7AgYGGOM60dQ9eu26ETz1pyRFbQ+UufeICPjSu/anNo5nSnsgYo1zMHJYypfdKaFozG3 GCLLVAA02dFsntUD9ptrYvyf0ViiqytPIItarO3BbUKIUo/s29JROGEdwcBKVVlS2x/cGb Aj6FECZc8cagMeeqt21NNk16H5zGUakxxU/frIzu+8VnVW+AK5wxIbQ1sUlFLIknMptDuB susTYFP8m0AuSoTWHN75DtsdKPt6qsXTV0gBOhngglFJbNadQ3RUx80xt+AxhVxBn24N7Q XE9NopUa7iu9mrvEFIBVyrX3eYjOfR8uX74WDEJIBTtvS0VfC1JiCa2orEgV4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726832405; 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=frMqBPnm2spisBdfFhsrcmHLvMtezzPjINndkGLJxGo=; b=Ckr9hsZ0aD2kLHMwsA8jXEX7qXHWqLj/oNS9b7DLgPk71KopYnBliD8hkKix8NLUnbTcIk 5iPcOizVh8HNsMzx5G7FGSojToUluTkHN8VQwu2+/Qr+FsD5LiSjSF/qJdZPvNys2ZARvo tNAQju4CAQuBm7ru4YAUkxtsInp/QZzC30drDgo0PROCKDrSVjfIWKOPNBGHXHpa+o55JJ eT+dycYijG/7jOit72xeJcgOlcuE+7ggwnQ5f7nCAr5AhzTccMxhiFRkTmMqk91O0Y1gao 4vh9Geu/bDXu8sNi4WS2Xd4L3M4OMHL74kkT4woctsUeolm6jzroe1MMTB1Z1g== 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 4X99RT3KDWznps; Fri, 20 Sep 2024 11:40:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48KBe5Cr007472; Fri, 20 Sep 2024 11:40:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48KBe5Fn007467; Fri, 20 Sep 2024 11:40:05 GMT (envelope-from git) Date: Fri, 20 Sep 2024 11:40:05 GMT Message-Id: <202409201140.48KBe5Fn007467@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f47e5a92edd6 - stable/14 - ifconfig: Add an allmulti verb List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f47e5a92edd6840fca6267649b1304c39fbbcc8f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f47e5a92edd6840fca6267649b1304c39fbbcc8f commit f47e5a92edd6840fca6267649b1304c39fbbcc8f Author: Mark Johnston AuthorDate: 2024-09-06 16:56:58 +0000 Commit: Mark Johnston CommitDate: 2024-09-20 11:39:16 +0000 ifconfig: Add an allmulti verb Similar to "promisc", this allows the IFF_ALLMULTI flag to be toggled from userspace if it happens to be useful to disable multicast packet filtering. One use-case is when implementing IPv6 neighbour discovery over netmap. Reviewed by: zlei, glebius MFC after: 2 weeks Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D46525 (cherry picked from commit 00c9a6806c9cf3357b62f6708e5acd1ffd166613) --- sbin/ifconfig/ifconfig.8 | 4 ++++ sbin/ifconfig/ifconfig.c | 2 ++ sbin/ifconfig/ifconfig_netlink.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 259be41bf94b..2f87ae8b8a5f 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -502,6 +502,10 @@ Enable driver dependent debugging code; usually, this turns on extra console error logging. .It Fl debug Disable driver dependent debugging code. +.It Cm allmulti +Enable promiscuous mode for multicast packets. +.It Fl allmulti +Disable promiscuous mode for multicast packets. .It Cm promisc Put interface into permanently promiscuous mode. .It Fl promisc diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 402967d405fd..5cf1ae6b79b7 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -2019,6 +2019,8 @@ static struct cmd basic_cmds[] = { DEF_CMD_ARG("descr", setifdescr), DEF_CMD("-description", 0, unsetifdescr), DEF_CMD("-descr", 0, unsetifdescr), + DEF_CMD("allmulti", IFF_PALLMULTI, setifflags), + DEF_CMD("-allmulti", IFF_PALLMULTI, clearifflags), DEF_CMD("promisc", IFF_PPROMISC, setifflags), DEF_CMD("-promisc", IFF_PPROMISC, clearifflags), DEF_CMD("add", IFF_UP, notealias), diff --git a/sbin/ifconfig/ifconfig_netlink.c b/sbin/ifconfig/ifconfig_netlink.c index bb0d242f21f6..03fe1e418082 100644 --- a/sbin/ifconfig/ifconfig_netlink.c +++ b/sbin/ifconfig/ifconfig_netlink.c @@ -77,7 +77,7 @@ static const char *IFFBITS[] = { "STICKYARP", /* 20:0x100000 IFF_STICKYARP*/ "DYING", /* 21:0x200000 IFF_DYING*/ "RENAMING", /* 22:0x400000 IFF_RENAMING*/ - "NOGROUP", /* 23:0x800000 IFF_NOGROUP*/ + "PALLMULTI", /* 23:0x800000 IFF_PALLMULTI*/ "LOWER_UP", /* 24:0x1000000 IFF_NETLINK_1*/ };