Date: Fri, 6 Sep 2024 17:19:57 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 00c9a6806c9c - main - ifconfig: Add an allmulti verb Message-ID: <202409061719.486HJvJ2074941@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=00c9a6806c9cf3357b62f6708e5acd1ffd166613 commit 00c9a6806c9cf3357b62f6708e5acd1ffd166613 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-09-06 16:56:58 +0000 Commit: Mark Johnston <markj@FreeBSD.org> 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*/ };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409061719.486HJvJ2074941>