From 737bf4d8b6e9e1bf50be69e8c99028bb2696190c Mon Sep 17 00:00:00 2001 From: DmitriyEshenko Date: Fri, 10 Dec 2021 19:43:42 +0300 Subject: vrf: T10: Add VRF support Co-authored-by: Sergey V. Lobanov Co-authored-by: Vladislav Grishenko --- accel-pppd/cli/show_sessions.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'accel-pppd/cli') diff --git a/accel-pppd/cli/show_sessions.c b/accel-pppd/cli/show_sessions.c index 6ef60595..73c6a41c 100644 --- a/accel-pppd/cli/show_sessions.c +++ b/accel-pppd/cli/show_sessions.c @@ -384,6 +384,14 @@ static void print_netns(struct ap_session *ses, char *buf) snprintf(buf, CELL_SIZE, "%s", ses->net->name); } +static void print_vrf(struct ap_session *ses, char *buf) +{ + if (ses->vrf_name) + snprintf(buf, CELL_SIZE, "%s", ses->vrf_name); + else + *buf = 0; +} + static void print_ifname(struct ap_session *ses, char *buf) { snprintf(buf, CELL_SIZE, "%s", ses->ifname); @@ -639,6 +647,7 @@ static void init(void) cli_register_simple_cmd2(show_ses_exec, show_ses_help, 2, "show", "sessions"); cli_show_ses_register("netns", "network namespace name", print_netns); + cli_show_ses_register("vrf", "vrf name", print_vrf); cli_show_ses_register("ifname", "interface name", print_ifname); cli_show_ses_register("username", "user name", print_username); cli_show_ses_register("ip", "IP address", print_ip); -- cgit v1.2.3