diff options
author | Martin Willi <martin@revosec.ch> | 2015-02-27 14:28:47 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2015-03-18 13:59:14 +0100 |
commit | 94bb26fae39d97fca6b1187797dc59ae6f9eca9e (patch) | |
tree | e985aa0a8e28fa1b22ea4799ea45405977bbcf9d /src/swanctl | |
parent | d1ad65f7b2e18601aed62849d83c382da2fa73f0 (diff) | |
download | strongswan-94bb26fae39d97fca6b1187797dc59ae6f9eca9e.tar.bz2 strongswan-94bb26fae39d97fca6b1187797dc59ae6f9eca9e.tar.xz |
vici: Return authentication rounds with unique names
To simplify handling of authentication rounds in dictionaries/hashtables on the
client side, we assign unique names to each authentication round when listing
connection.
Diffstat (limited to 'src/swanctl')
-rw-r--r-- | src/swanctl/commands/list_conns.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/swanctl/commands/list_conns.c b/src/swanctl/commands/list_conns.c index 31ab9c40a..019c88888 100644 --- a/src/swanctl/commands/list_conns.c +++ b/src/swanctl/commands/list_conns.c @@ -103,7 +103,7 @@ CALLBACK(conn_sn, int, { return vici_parse_cb(res, children_sn, NULL, NULL, NULL); } - if (streq(name, "local") || streq(name, "remote")) + if (strpfx(name, "local") || strpfx(name, "remote")) { hashtable_t *auth; @@ -112,7 +112,8 @@ CALLBACK(conn_sn, int, if (ret == 0) { printf(" %s %s authentication:\n", - name, auth->get(auth, "class") ?: "unspecified"); + strpfx(name, "local") ? "local" : "remote", + auth->get(auth, "class") ?: "unspecified"); if (auth->get(auth, "id")) { printf(" id: %s\n", auth->get(auth, "id")); |