Skip to contentSkip to conversation

ip/netkit: print peer policy

PATCH Applied Nikolay Aleksandrov 3 participants 3 messages Aug 6, 2024 – Aug 20, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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
...
---
 ip/iplink_netkit.c | 6 ++++++
 1 file changed, 6 insertions(+)
ip/iplink_netkit.c +6 -0
index a838a41078f9..49550a2e74ca 100644
@@ -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,
Signature · 1 line
2.44.0
#1 lore raw
This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Quoted 9 lines · On Tue, 6 Aug 2024 13:55:48 +0300 you wrote:

Print also the peer policy, example:

$ ip -d l sh dev netkit0
...
 netkit mode l2 type primary policy blackhole peer policy forward
...

[...]

Here is the summary with links:
- [iproute2-next] ip/netkit: print peer policy

    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=354d8a368851

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html