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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240806105548.3297249-1-razor@blackwall.org>
Date: Tue,  6 Aug 2024 13:55:48 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: netdev@...r.kernel.org
Cc: stephen@...workplumber.org,
	daniel@...earbox.net,
	dsahern@...nel.org,
	Nikolay Aleksandrov <razor@...ckwall.org>
Subject: [PATCH iproute2-next] ip/netkit: print peer policy

Print also the peer policy, example:
$ ip -d l sh dev netkit0
...
 netkit mode l2 type primary policy blackhole peer policy forward
...

Signed-off-by: Nikolay Aleksandrov <razor@...ckwall.org>
---
 ip/iplink_netkit.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ip/iplink_netkit.c b/ip/iplink_netkit.c
index a838a41078f9..49550a2e74ca 100644
--- a/ip/iplink_netkit.c
+++ b/ip/iplink_netkit.c
@@ -166,6 +166,12 @@ static void netkit_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
 		print_string(PRINT_ANY, "policy", "policy %s ",
 			     netkit_print_policy(policy));
 	}
+	if (tb[IFLA_NETKIT_PEER_POLICY]) {
+		__u32 policy = rta_getattr_u32(tb[IFLA_NETKIT_PEER_POLICY]);
+
+		print_string(PRINT_ANY, "peer_policy", "peer policy %s ",
+			     netkit_print_policy(policy));
+	}
 }
 
 static void netkit_print_help(struct link_util *lu,
-- 
2.44.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ