summaryrefslogtreecommitdiff
path: root/src/libtnccs/plugins
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2015-10-22 11:43:58 +0200
committerYves-Alexis Perez <corsac@debian.org>2015-10-22 11:43:58 +0200
commit5dca9ea0e2931f0e2a056c7964d311bcc30a01b8 (patch)
tree037f1ec5bb860846938ddcf29771c24e9c529be0 /src/libtnccs/plugins
parentb238cf34df3fe4476ae6b7012e7cb3e9769d4d51 (diff)
downloadvyos-strongswan-5dca9ea0e2931f0e2a056c7964d311bcc30a01b8.tar.gz
vyos-strongswan-5dca9ea0e2931f0e2a056c7964d311bcc30a01b8.zip
Imported Upstream version 5.3.3
Diffstat (limited to 'src/libtnccs/plugins')
-rw-r--r--src/libtnccs/plugins/tnc_tnccs/tnc_tnccs_manager.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libtnccs/plugins/tnc_tnccs/tnc_tnccs_manager.c b/src/libtnccs/plugins/tnc_tnccs/tnc_tnccs_manager.c
index 30e505246..67c33ee63 100644
--- a/src/libtnccs/plugins/tnc_tnccs/tnc_tnccs_manager.c
+++ b/src/libtnccs/plugins/tnc_tnccs/tnc_tnccs_manager.c
@@ -729,7 +729,9 @@ METHOD(tnccs_manager_t, get_attribute, TNC_Result,
list = linked_list_create();
tnccs = entry->tnccs;
- peer_id = tnccs->tls.get_peer_id(&tnccs->tls);
+ peer_id = tnccs->tls.is_server(&tnccs->tls) ?
+ tnccs->tls.get_peer_id(&tnccs->tls) :
+ tnccs->tls.get_server_id(&tnccs->tls);
if (peer_id)
{
switch (peer_id->get_type(peer_id))
@@ -771,7 +773,9 @@ METHOD(tnccs_manager_t, get_attribute, TNC_Result,
}
}
- peer_ip = tnccs->get_peer_ip(tnccs);
+ peer_ip = tnccs->tls.is_server(&tnccs->tls) ?
+ tnccs->get_peer_ip(tnccs) :
+ tnccs->get_server_ip(tnccs);
if (peer_ip)
{
switch (peer_ip->get_family(peer_ip))