diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2006-06-02 12:29:44 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2006-06-02 12:29:44 +0000 |
commit | b15abbd7eda483de9ad742845e6f720de6e48eca (patch) | |
tree | b876889fd6bc762541f8bb25feb272cf8900e7c4 /sbin/ipsecctl/pfkdump.c | |
parent | e3d531fb8627116efdbfa1792ae7e63ff68aeb23 (diff) |
print full information about tcpmd5 and ipcomp SAs, too
Diffstat (limited to 'sbin/ipsecctl/pfkdump.c')
-rw-r--r-- | sbin/ipsecctl/pfkdump.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sbin/ipsecctl/pfkdump.c b/sbin/ipsecctl/pfkdump.c index 4503a6b29f2..f4e3f92e6fb 100644 --- a/sbin/ipsecctl/pfkdump.c +++ b/sbin/ipsecctl/pfkdump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkdump.c,v 1.17 2006/06/02 04:14:51 hshoexer Exp $ */ +/* $OpenBSD: pfkdump.c,v 1.18 2006/06/02 12:29:43 markus Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. @@ -630,7 +630,24 @@ pfkey_print_sa(struct sadb_msg *msg, int opts) parse_addr(extensions[SADB_EXT_ADDRESS_DST], &dst); r.src = &src; r.dst = &dst; - if (sa->sadb_sa_encrypt || sa->sadb_sa_encrypt) { + if (r.satype == IPSEC_IPCOMP) { + if (sa->sadb_sa_encrypt) { + bzero(&xfs, sizeof xfs); + r.xfs = &xfs; + switch (sa->sadb_sa_encrypt) { + case SADB_X_CALG_DEFLATE: + xfs.encxf = &compxfs[COMPXF_DEFLATE]; + break; + case SADB_X_CALG_LZS: + xfs.encxf = &compxfs[COMPXF_LZS]; + break; + } + } + } else if (r.satype == IPSEC_TCPMD5) { + bzero(&authkey, sizeof authkey); + parse_key(extensions[SADB_EXT_KEY_AUTH], &authkey); + r.authkey = &authkey; + } else if (sa->sadb_sa_encrypt || sa->sadb_sa_encrypt) { bzero(&xfs, sizeof xfs); r.xfs = &xfs; if (sa->sadb_sa_encrypt) { |