diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2003-02-15 22:58:00 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2003-02-15 22:58:00 +0000 |
commit | 1f48542324310c7bb07bae5b7d6252f09c7bfbe1 (patch) | |
tree | ab7583984448c2873dd3cad5be1757cb05976c26 /sys/net/pfkeyv2.c | |
parent | 4a0dddfd01348e3c2a7f9b347673233797e055d7 (diff) |
skeleton support for LZS compression
Diffstat (limited to 'sys/net/pfkeyv2.c')
-rw-r--r-- | sys/net/pfkeyv2.c | 10 |
1 files changed, 7 insertions, 3 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; } } |