Message ID | 20240806105548.3297249-1-razor@blackwall.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 354d8a36885172b6e27ca65ff85c2c51e740fda0 |
Delegated to: | David Ahern |
Headers | show |
Series | [iproute2-next] ip/netkit: print peer policy | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
Hello: This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <dsahern@kernel.org>: 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 > ... > > Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org> > > [...] 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!
On 8/6/24 12:55 PM, Nikolay Aleksandrov wrote: > 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@blackwall.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
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,
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@blackwall.org> --- ip/iplink_netkit.c | 6 ++++++ 1 file changed, 6 insertions(+)