lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201008135024.1515468-5-razor@blackwall.org>
Date:   Thu,  8 Oct 2020 16:50:22 +0300
From:   Nikolay Aleksandrov <razor@...ckwall.org>
To:     netdev@...r.kernel.org
Cc:     roopa@...dia.com, dsahern@...il.com,
        Nikolay Aleksandrov <nikolay@...dia.com>
Subject: [PATCH iproute2-next 4/6] bridge: mdb: print filter mode when available

From: Nikolay Aleksandrov <nikolay@...dia.com>

Print the mdb entry's filter mode when it's available if the user
requested to show details (-d). It can be either include or exclude.
Currently it's kernel controlled and can't be changed by user-space.

Signed-off-by: Nikolay Aleksandrov <nikolay@...dia.com>
---
 bridge/mdb.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/bridge/mdb.c b/bridge/mdb.c
index d33bd5d5c7df..c0cb4fd1421e 100644
--- a/bridge/mdb.c
+++ b/bridge/mdb.c
@@ -150,6 +150,13 @@ static void print_mdb_entry(FILE *f, int ifindex, const struct br_mdb_entry *e,
 	print_string(PRINT_ANY, "state", " %s",
 			   (e->state & MDB_PERMANENT) ? "permanent" : "temp");
 
+	if (show_details && tb && tb[MDBA_MDB_EATTR_GROUP_MODE]) {
+		__u8 mode = rta_getattr_u8(tb[MDBA_MDB_EATTR_GROUP_MODE]);
+
+		print_string(PRINT_ANY, "filter_mode", " filter_mode %s",
+			     mode == MCAST_INCLUDE ? "include" : "exclude");
+	}
+
 	open_json_array(PRINT_JSON, "flags");
 	if (e->flags & MDB_FLAGS_OFFLOAD)
 		print_string(PRINT_ANY, NULL, " %s", "offload");
-- 
2.25.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ