Display IKE ports with swanctl --list-sas

This commit is contained in:
Andreas Steffen
2016-03-05 18:19:00 +01:00
parent 724f590711
commit 99b794a4cf
+9 -4
View File
@@ -2,6 +2,9 @@
* Copyright (C) 2014 Martin Willi * Copyright (C) 2014 Martin Willi
* Copyright (C) 2014 revosec AG * Copyright (C) 2014 revosec AG
* *
* Copyright (C) 2016 Andreas Steffen
* HSR Hochschule fuer Technik Rapperswil
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your * Free Software Foundation; either version 2 of the License, or (at your
@@ -198,16 +201,18 @@ CALLBACK(ike_sa, int,
ike->get(ike, "state"), ike->get(ike, "version"), ike->get(ike, "state"), ike->get(ike, "version"),
ike->get(ike, "initiator-spi"), ike->get(ike, "responder-spi")); ike->get(ike, "initiator-spi"), ike->get(ike, "responder-spi"));
printf(" local '%s' @ %s", printf(" local '%s' @ %s[%s]",
ike->get(ike, "local-id"), ike->get(ike, "local-host")); ike->get(ike, "local-id"), ike->get(ike, "local-host"),
ike->get(ike, "local-port"));
if (ike->get(ike, "local-vips")) if (ike->get(ike, "local-vips"))
{ {
printf(" [%s]", ike->get(ike, "local-vips")); printf(" [%s]", ike->get(ike, "local-vips"));
} }
printf("\n"); printf("\n");
printf(" remote '%s' @ %s", printf(" remote '%s' @ %s[%s]",
ike->get(ike, "remote-id"), ike->get(ike, "remote-host")); ike->get(ike, "remote-id"), ike->get(ike, "remote-host"),
ike->get(ike, "remote-port"));
if (ike->get(ike, "remote-eap-id")) if (ike->get(ike, "remote-eap-id"))
{ {
printf(" EAP: '%s'", ike->get(ike, "remote-eap-id")); printf(" EAP: '%s'", ike->get(ike, "remote-eap-id"));