diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2007-08-03 11:16:43 +0000 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2007-08-03 11:16:43 +0000 |
commit | a263d322a1f7870e534252f8d35a1485e6b40809 (patch) | |
tree | 1c82665b5fdce72f3fba7626c21f5822f9fdb6ea | |
parent | 90b21fde11067943e930b8af694b6e9af1fb9c08 (diff) | |
download | strongswan-a263d322a1f7870e534252f8d35a1485e6b40809.tar.bz2 strongswan-a263d322a1f7870e534252f8d35a1485e6b40809.tar.xz |
re-introduced listing of nexthop in ipsec status
-rw-r--r-- | src/pluto/connections.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/pluto/connections.c b/src/pluto/connections.c index c4d5dae4d..609364266 100644 --- a/src/pluto/connections.c +++ b/src/pluto/connections.c @@ -638,13 +638,24 @@ format_end(char *buf strcpy(&host_id[len < 0? (ptrdiff_t)sizeof(host_id)-2 : 1 + len], "]"); } + /* [---hop] */ + hop[0] = '\0'; + hop_sep = ""; + if (that != NULL && !sameaddr(&this->host_nexthop, &that->host_addr)) + { + addrtot(&this->host_nexthop, 0, hop, sizeof(hop)); + hop_sep = "---"; + } + if (is_left) - snprintf(buf, buf_len, "%s%s%s%s%s%s%s%s%s" + snprintf(buf, buf_len, "%s%s%s%s%s%s%s%s%s%s%s" , open_brackets, client, close_brackets, client_sep , this->allow_any? "%":"" - , host, host_port, host_id, protoport); + , host, host_port, host_id, protoport + , hop_sep, hop); else - snprintf(buf, buf_len, "%s%s%s%s%s%s%s%s%s" + snprintf(buf, buf_len, "%s%s%s%s%s%s%s%s%s%s%s" + , hop, hop_sep , this->allow_any? "%":"" , host, host_port, host_id, protoport, client_sep , open_brackets, client, close_brackets); |