diff options
Diffstat (limited to 'accel-pppd/cli/show_sessions.c')
-rw-r--r-- | accel-pppd/cli/show_sessions.c | 9 |
1 files changed, 9 insertions, 0 deletions
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); |