summaryrefslogtreecommitdiff
path: root/accel-pppd/cli
diff options
context:
space:
mode:
authorxebd <xeb@mail.ru>2021-12-17 17:03:23 +0300
committerGitHub <noreply@github.com>2021-12-17 17:03:23 +0300
commit385c4038c451f5c181136070846cab0664dae43a (patch)
tree7796b3ae25edf6d41642d7c6b691089d6cbb15c2 /accel-pppd/cli
parentda519116998d7d34988890f4dad32d2fbe922441 (diff)
parent737bf4d8b6e9e1bf50be69e8c99028bb2696190c (diff)
downloadaccel-ppp-385c4038c451f5c181136070846cab0664dae43a.tar.gz
accel-ppp-385c4038c451f5c181136070846cab0664dae43a.zip
Merge pull request #29 from DmitriyEshenko/master-10122021
vrf: T10: Add VRF support
Diffstat (limited to 'accel-pppd/cli')
-rw-r--r--accel-pppd/cli/show_sessions.c9
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);