From nobody Fri Sep 06 17:19:57 2024 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 4X0jf63kSHz5VXq7; Fri, 06 Sep 2024 17:19:58 +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 4X0jf6152Zz47Nj; Fri, 6 Sep 2024 17:19:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725643198; 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=faAjTBP6sTgkJrD9H3SuPsEZkGu2RdJJPC1HBqiWuMQ=; b=QeQdTeFj1zrJ9dSILkYPKB9gW6a2Vw0ckPr5tsTqDLXJtKL/itBPbQmC0aGdbgz4BKVt+W sVZSaMt16p8lwUNAY7xOYPw8oVhNVrUEFeWPLLPiBiNgP9BBCRoP1RqIgV6WK+czJ+gYcK 1Kj/YkUuFQJ8ru0rTaWAqhIrcPkyhsrHXLSkgsP5FOaeNxBr+9FJFRJCVv5OLT/Kp02LYu lEu1aTyS5xFwHdPFdaiMkLqgkEFb03lcSruDk2bQOkH+CeDriKUnBxpqILOCxc1WcW51dI j/JlrZqsVzML/SQblIE1lBCN8Zwl/7X/mj/dPqcjVp1sm02TtYPtTUdrN8L9Tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725643198; a=rsa-sha256; cv=none; b=VKDTXLIL3fb1N1mcgJeMb+1P6W4n1xPHWFU7V5jQLNj2Tun/35RauUHcwpTNlexPoYH3uK 29WcBCZ4WT3gsilwoUQKrNQSoIK6oGqd4II6/GsT7RVWPtmpSnBxdBUaSBher/DXD5m8ZG ZQDPirUyq1HaBlsC6caz7SZ13ba89ZZjpfwgyKjpADvAkdfiqI+9NTjr4L+8Y/L0GcfBT4 oIR6L41oQ0BNu/G5PtxNFIQu0uYMkCFX/MYEr4IIpdOne4XyojdbBw9ieFDucRRpLj5lZf jzrPzSZGX7EZWruYVliUPabbY6kRTe2tZ5uO8xGDTt7FvOrWgZLgzLW6C2uh/A== 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=1725643198; 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=faAjTBP6sTgkJrD9H3SuPsEZkGu2RdJJPC1HBqiWuMQ=; b=V93VRVxnQByn8iKscxDKgyu4v3MyY8/6QL9Fv9IgciqAhjZnRANm2E1Vjc0pSaQjjaICIt 58++9dLdwub8Sd8z3IGsa1Cv04z2pidVURC5Cp+c8HMWB+FIKkxkM3q+PiN4qSFBMjjLVW xwLCrJ2LNHMaM0qlEb2deDA2GqkTuCxd9tovYcdC5EfUva8mpt10EamYqxYe2hEVTfi9kY SdMKLJHXP1agrdxJAgWspZoY8lpNACkTMwo/leRwI8Q+aFj8C61YZ5PP6V9vPz3hdQbnFA og9ISQN9plt3AKpNuWpKwn5WP5X0EgqZtohiFUagrUOudlg+g3jpzBpsHfmZ5w== 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 4X0jf60NKfz11J0; Fri, 6 Sep 2024 17:19:58 +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 486HJvfr074944; Fri, 6 Sep 2024 17:19:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 486HJvJ2074941; Fri, 6 Sep 2024 17:19:57 GMT (envelope-from git) Date: Fri, 6 Sep 2024 17:19:57 GMT Message-Id: <202409061719.486HJvJ2074941@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 00c9a6806c9c - main - ifconfig: Add an allmulti verb 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 00c9a6806c9cf3357b62f6708e5acd1ffd166613 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=00c9a6806c9cf3357b62f6708e5acd1ffd166613 commit 00c9a6806c9cf3357b62f6708e5acd1ffd166613 Author: Mark Johnston AuthorDate: 2024-09-06 16:56:58 +0000 Commit: Mark Johnston CommitDate: 2024-09-06 16:58:44 +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 --- 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 c9861ccc6481..dfea59dfd229 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 e6ed9015b34b..a0680d09e54c 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -2078,6 +2078,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 729d4ca56545..5a986e840d7f 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*/ };