diff options
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pfkeyv2.c | 10 | ||||
-rw-r--r-- | sys/net/pfkeyv2_convert.c | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c index 30655fcbb0d..02ce61ecfa3 100644 --- a/sys/net/pfkeyv2.c +++ b/sys/net/pfkeyv2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.c,v 1.84 2002/07/31 00:13:36 itojun Exp $ */ +/* $OpenBSD: pfkeyv2.c,v 1.85 2003/02/15 22:57:58 jason Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -113,6 +113,7 @@ static struct sadb_alg aalgs[] = static struct sadb_alg calgs[] = { { SADB_X_CALG_DEFLATE, 0, 0, 0}, + { SADB_X_CALG_LZS, 0, 0, 0}, }; extern uint32_t sadb_exts_allowed_out[SADB_MAX+1]; @@ -2035,11 +2036,14 @@ pfkeyv2_acquire(struct ipsec_policy *ipo, union sockaddr_union *gw, else if (ipo->ipo_sproto == IPPROTO_IPCOMP) { /* Set the compression algorithm */ - if (!strncasecmp(ipsec_def_comp, "deflate", sizeof("deflate"))) - { + if (!strncasecmp(ipsec_def_comp, "deflate", sizeof("deflate"))) { sadb_comb->sadb_comb_encrypt = SADB_X_CALG_DEFLATE; sadb_comb->sadb_comb_encrypt_minbits = 0; sadb_comb->sadb_comb_encrypt_maxbits = 0; + } else if (!strncasecmp(ipsec_def_comp, "lzs", sizeof("lzs"))) { + sadb_comb->sadb_comb_encrypt = SADB_X_CALG_LZS; + sadb_comb->sadb_comb_encrypt_minbits = 0; + sadb_comb->sadb_comb_encrypt_maxbits = 0; } } diff --git a/sys/net/pfkeyv2_convert.c b/sys/net/pfkeyv2_convert.c index 76b70ce42c8..fefb11a37b1 100644 --- a/sys/net/pfkeyv2_convert.c +++ b/sys/net/pfkeyv2_convert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2_convert.c,v 1.12 2002/06/09 23:15:42 angelos Exp $ */ +/* $OpenBSD: pfkeyv2_convert.c,v 1.13 2003/02/15 22:57:59 jason Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@keromytis.org) * @@ -163,6 +163,9 @@ export_sa(void **p, struct tdb *tdb) case CRYPTO_DEFLATE_COMP: sadb_sa->sadb_sa_encrypt = SADB_X_CALG_DEFLATE; break; + case CRYPTO_LZS_COMP: + sadb_sa->sadb_sa_encrypt = SADB_X_CALG_LZS; + break; } } |