Hi,

After deleting hifn(4) the only provider for the LZS compression
algorithm is gone.  Reomve all LZS references from our tree.  The
v42bis in isakmpd also looks unsupported.

ok?

bluhm

Index: sys/crypto/cryptodev.h
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/crypto/cryptodev.h,v
retrieving revision 1.76
diff -u -p -r1.76 cryptodev.h
--- sys/crypto/cryptodev.h      13 Oct 2021 22:43:44 -0000      1.76
+++ sys/crypto/cryptodev.h      21 Oct 2021 22:04:28 -0000
@@ -91,7 +91,6 @@
 #define CRYPTO_AES_CBC         7  /* 128 bit blocksize -- the same as above */
 #define CRYPTO_DEFLATE_COMP    8  /* Deflate compression algorithm */
 #define CRYPTO_NULL            9
-#define CRYPTO_LZS_COMP                10 /* LZS compression algorithm */
 #define CRYPTO_SHA2_256_HMAC   11
 #define CRYPTO_SHA2_384_HMAC   12
 #define CRYPTO_SHA2_512_HMAC   13
Index: sys/crypto/xform.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/crypto/xform.c,v
retrieving revision 1.60
diff -u -p -r1.60 xform.c
--- sys/crypto/xform.c  8 Jul 2021 09:22:30 -0000       1.60
+++ sys/crypto/xform.c  21 Oct 2021 22:00:38 -0000
@@ -106,7 +106,6 @@ int SHA512Update_int(void *, const u_int
 
 u_int32_t deflate_compress(u_int8_t *, u_int32_t, u_int8_t **);
 u_int32_t deflate_decompress(u_int8_t *, u_int32_t, u_int8_t **);
-u_int32_t lzs_dummy(u_int8_t *, u_int32_t, u_int8_t **);
 
 struct aes_ctr_ctx {
        AES_CTX         ac_key;
@@ -306,12 +305,6 @@ const struct comp_algo comp_algo_deflate
        deflate_decompress
 };
 
-const struct comp_algo comp_algo_lzs = {
-       CRYPTO_LZS_COMP, "LZS",
-       90, lzs_dummy,
-       lzs_dummy
-};
-
 /*
  * Encryption wrapper routines.
  */
@@ -617,11 +610,4 @@ u_int32_t
 deflate_decompress(u_int8_t *data, u_int32_t size, u_int8_t **out)
 {
        return deflate_global(data, size, 1, out);
-}
-
-u_int32_t
-lzs_dummy(u_int8_t *data, u_int32_t size, u_int8_t **out)
-{
-       *out = NULL;
-       return (0);
 }
Index: sys/crypto/xform.h
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/crypto/xform.h,v
retrieving revision 1.31
diff -u -p -r1.31 xform.h
--- sys/crypto/xform.h  8 Jul 2021 09:22:30 -0000       1.31
+++ sys/crypto/xform.h  21 Oct 2021 22:00:03 -0000
@@ -107,6 +107,5 @@ extern const struct auth_hash auth_hash_
 extern const struct auth_hash auth_hash_chacha20_poly1305;
 
 extern const struct comp_algo comp_algo_deflate;
-extern const struct comp_algo comp_algo_lzs;
 
 #endif /* _CRYPTO_XFORM_H_ */
Index: sys/net/pfkeyv2.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/net/pfkeyv2.c,v
retrieving revision 1.219
diff -u -p -r1.219 pfkeyv2.c
--- sys/net/pfkeyv2.c   20 Jul 2021 16:32:28 -0000      1.219
+++ sys/net/pfkeyv2.c   21 Oct 2021 21:59:34 -0000
@@ -118,8 +118,7 @@ static const struct sadb_alg aalgs[] = {
 };
 
 static const struct sadb_alg calgs[] = {
-       { SADB_X_CALG_DEFLATE, 0, 0, 0},
-       { SADB_X_CALG_LZS, 0, 0, 0}
+       { SADB_X_CALG_DEFLATE, 0, 0, 0}
 };
 
 struct pool pkpcb_pool;
@@ -2266,11 +2265,6 @@ pfkeyv2_acquire(struct ipsec_policy *ipo
                        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;
                        }
Index: sys/net/pfkeyv2.h
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/net/pfkeyv2.h,v
retrieving revision 1.90
diff -u -p -r1.90 pfkeyv2.h
--- sys/net/pfkeyv2.h   14 Jul 2021 22:39:26 -0000      1.90
+++ sys/net/pfkeyv2.h   21 Oct 2021 22:03:15 -0000
@@ -351,8 +351,7 @@ struct sadb_x_mtu {
 #define SADB_X_CALG_NONE       0
 #define SADB_X_CALG_OUI                1
 #define SADB_X_CALG_DEFLATE    2
-#define SADB_X_CALG_LZS                3
-#define SADB_X_CALG_MAX                3
+#define SADB_X_CALG_MAX                2
 
 #define SADB_SAFLAGS_PFS               0x001   /* perfect forward secrecy */
 #define SADB_X_SAFLAGS_TUNNEL          0x004   /* Force tunneling */
Index: sys/net/pfkeyv2_convert.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/net/pfkeyv2_convert.c,v
retrieving revision 1.74
diff -u -p -r1.74 pfkeyv2_convert.c
--- sys/net/pfkeyv2_convert.c   27 Jul 2021 17:13:03 -0000      1.74
+++ sys/net/pfkeyv2_convert.c   21 Oct 2021 22:03:44 -0000
@@ -171,9 +171,6 @@ 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;
                }
        }
 
Index: sys/netinet/ip_ipcomp.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/ip_ipcomp.c,v
retrieving revision 1.76
diff -u -p -r1.76 ip_ipcomp.c
--- sys/netinet/ip_ipcomp.c     13 Oct 2021 22:43:44 -0000      1.76
+++ sys/netinet/ip_ipcomp.c     21 Oct 2021 21:59:02 -0000
@@ -90,10 +90,6 @@ ipcomp_init(struct tdb *tdbp, const stru
        case SADB_X_CALG_DEFLATE:
                tcomp = &comp_algo_deflate;
                break;
-       case SADB_X_CALG_LZS:
-               tcomp = &comp_algo_lzs;
-               break;
-
        default:
                DPRINTF("unsupported compression algorithm %d specified",
                    ii->ii_compalg);
Index: lib/libc/sys/sysctl.2
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/lib/libc/sys/sysctl.2,v
retrieving revision 1.44
diff -u -p -r1.44 sysctl.2
--- lib/libc/sys/sysctl.2       18 May 2021 05:26:26 -0000      1.44
+++ lib/libc/sys/sysctl.2       21 Oct 2021 22:51:33 -0000
@@ -1520,15 +1520,8 @@ The default value is 0.
 .It Li ip.ipsec-comp-alg Pq Va net.inet.ip.ipsec-comp-alg
 The compression algorithm to use with an IP Compression Association
 .Pq IPCA .
-Possible values are
-.Dq deflate
-and
-.Dq lzs .
-Note that lzs is only available with
-.Xr hifn 4 .
-See
-.Xr ipsecctl 8
-for more information.
+The possible value is
+.Dq deflate .
 .It Li ip.ipsec-enc-alg Pq Va net.inet.ip.ipsec-enc-alg
 This is the default encryption algorithm the kernel will instruct key
 management daemons to negotiate when establishing security
Index: sbin/isakmpd/ipsec.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sbin/isakmpd/ipsec.c,v
retrieving revision 1.150
diff -u -p -r1.150 ipsec.c
--- sbin/isakmpd/ipsec.c        15 Jan 2018 09:54:48 -0000      1.150
+++ sbin/isakmpd/ipsec.c        21 Oct 2021 22:34:11 -0000
@@ -1019,7 +1019,7 @@ ipsec_validate_transform_id(u_int8_t pro
                    transform_id > IPSEC_ESP_AES_TWOFISH ? -1 : 0;
        case IPSEC_PROTO_IPCOMP:
                return transform_id < IPSEC_IPCOMP_OUI ||
-                   transform_id > IPSEC_IPCOMP_V42BIS ? -1 : 0;
+                   transform_id > IPSEC_IPCOMP_DEFLATE ? -1 : 0;
        }
 }
 
Index: sbin/isakmpd/ipsec_num.cst
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sbin/isakmpd/ipsec_num.cst,v
retrieving revision 1.20
diff -u -p -r1.20 ipsec_num.cst
--- sbin/isakmpd/ipsec_num.cst  27 Oct 2017 08:29:32 -0000      1.20
+++ sbin/isakmpd/ipsec_num.cst  21 Oct 2021 22:23:43 -0000
@@ -257,8 +257,6 @@ IPSEC_ESP
 IPSEC_IPCOMP
   OUI                                  1
   DEFLATE                              2
-  LZS                                  3
-  V42BIS                               4
 .
 
 # IPSEC notify message types.
Index: sbin/isakmpd/isakmpd.policy.5
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sbin/isakmpd/isakmpd.policy.5,v
retrieving revision 1.48
diff -u -p -r1.48 isakmpd.policy.5
--- sbin/isakmpd/isakmpd.policy.5       11 Jan 2016 09:52:03 -0000      1.48
+++ sbin/isakmpd/isakmpd.policy.5       21 Oct 2021 22:24:43 -0000
@@ -356,10 +356,8 @@ Always set to
 .It comp_alg
 One of
 .Va oui ,
-.Va deflate ,
-.Va lzs ,
 or
-.Va v42bis ,
+.Va deflate ,
 based on the compression algorithm specified in the compression
 proposal.
 .It comp_dict_size
Index: sbin/isakmpd/pf_key_v2.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sbin/isakmpd/pf_key_v2.c,v
retrieving revision 1.201
diff -u -p -r1.201 pf_key_v2.c
--- sbin/isakmpd/pf_key_v2.c    29 Nov 2019 22:06:19 -0000      1.201
+++ sbin/isakmpd/pf_key_v2.c    21 Oct 2021 22:34:46 -0000
@@ -1032,10 +1032,6 @@ pf_key_v2_set_spi(struct sa *sa, struct 
                        ssa.sadb_sa_encrypt = SADB_X_CALG_DEFLATE;
                        break;
 
-               case IPSEC_IPCOMP_LZS:
-                       ssa.sadb_sa_encrypt = SADB_X_CALG_LZS;
-                       break;
-
                default:
                        break;
                }
Index: sbin/isakmpd/policy.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sbin/isakmpd/policy.c,v
retrieving revision 1.101
diff -u -p -r1.101 policy.c
--- sbin/isakmpd/policy.c       3 Jul 2019 03:24:02 -0000       1.101
+++ sbin/isakmpd/policy.c       21 Oct 2021 22:35:40 -0000
@@ -346,14 +346,6 @@ policy_callback(char *name)
                                case IPSEC_IPCOMP_DEFLATE:
                                        comp_alg = "deflate";
                                        break;
-
-                               case IPSEC_IPCOMP_LZS:
-                                       comp_alg = "lzs";
-                                       break;
-
-                               case IPSEC_IPCOMP_V42BIS:
-                                       comp_alg = "v42bis";
-                                       break;
                                }
 
                                break;
Index: sbin/ipsecctl/ipsec.conf.5
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sbin/ipsecctl/ipsec.conf.5,v
retrieving revision 1.159
diff -u -p -r1.159 ipsec.conf.5
--- sbin/ipsecctl/ipsec.conf.5  16 Feb 2020 11:28:28 -0000      1.159
+++ sbin/ipsecctl/ipsec.conf.5  21 Oct 2021 22:18:13 -0000
@@ -907,20 +907,6 @@ If no algorithm is specified,
 will choose
 .Ar hmac-sha2-256
 by default.
-.\".It Xo
-.\".Ic comp
-.\".Aq Ar algorithm
-.\".Xc
-.\"The compression algorithm to be used.
-.\"Possible algorithms are
-.\".Ar deflate
-.\"and
-.\".Ar lzs .
-.\"Note that
-.\".Ar lzs
-.\"is only available with
-.\".Xr hifn 4
-.\"because of the patent held by Hifn, Inc.
 .It Ic enc Ar algorithm
 For ESP
 an encryption algorithm can be specified.
Index: sbin/ipsecctl/ipsecctl.h
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sbin/ipsecctl/ipsecctl.h,v
retrieving revision 1.74
diff -u -p -r1.74 ipsecctl.h
--- sbin/ipsecctl/ipsecctl.h    7 Feb 2020 13:01:34 -0000       1.74
+++ sbin/ipsecctl/ipsecctl.h    21 Oct 2021 22:17:17 -0000
@@ -71,7 +71,7 @@ enum {
        ENCXF_BLOWFISH, ENCXF_CAST128, ENCXF_CHACHA20_POLY1305, ENCXF_NULL
 };
 enum {
-       COMPXF_UNKNOWN, COMPXF_DEFLATE, COMPXF_LZS
+       COMPXF_UNKNOWN, COMPXF_DEFLATE
 };
 enum {
        GROUPXF_UNKNOWN, GROUPXF_NONE, GROUPXF_1, GROUPXF_2, GROUPXF_5,
Index: sbin/ipsecctl/parse.y
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sbin/ipsecctl/parse.y,v
retrieving revision 1.180
diff -u -p -r1.180 parse.y
--- sbin/ipsecctl/parse.y       15 Oct 2021 15:01:27 -0000      1.180
+++ sbin/ipsecctl/parse.y       21 Oct 2021 22:16:52 -0000
@@ -129,7 +129,6 @@ const struct ipsec_xf encxfs[] = {
 const struct ipsec_xf compxfs[] = {
        { "unknown",            COMPXF_UNKNOWN,         0,      0 },
        { "deflate",            COMPXF_DEFLATE,         0,      0 },
-       { "lzs",                COMPXF_LZS,             0,      0 },
        { NULL,                 0,                      0,      0 },
 };
 
Index: sbin/ipsecctl/pfkdump.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sbin/ipsecctl/pfkdump.c,v
retrieving revision 1.54
diff -u -p -r1.54 pfkdump.c
--- sbin/ipsecctl/pfkdump.c     14 Jul 2021 22:39:26 -0000      1.54
+++ sbin/ipsecctl/pfkdump.c     21 Oct 2021 22:16:21 -0000
@@ -184,7 +184,6 @@ struct idname comp_types[] = {
        { SADB_X_CALG_NONE,             "none",                 NULL },
        { SADB_X_CALG_OUI,              "oui",                  NULL },
        { SADB_X_CALG_DEFLATE,          "deflate",              NULL },
-       { SADB_X_CALG_LZS,              "lzs",                  NULL },
        { 0,                            NULL,                   NULL }
 };
 
@@ -755,9 +754,6 @@ pfkey_print_sa(struct sadb_msg *msg, int
                        switch (sa->sadb_sa_encrypt) {
                        case SADB_X_CALG_DEFLATE:
                                xfs.compxf = &compxfs[COMPXF_DEFLATE];
-                               break;
-                       case SADB_X_CALG_LZS:
-                               xfs.compxf = &compxfs[COMPXF_LZS];
                                break;
                        }
                }
Index: sbin/ipsecctl/pfkey.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sbin/ipsecctl/pfkey.c,v
retrieving revision 1.62
diff -u -p -r1.62 pfkey.c
--- sbin/ipsecctl/pfkey.c       7 Feb 2020 13:01:34 -0000       1.62
+++ sbin/ipsecctl/pfkey.c       21 Oct 2021 22:17:06 -0000
@@ -527,9 +527,6 @@ pfkey_sa(int sd, u_int8_t satype, u_int8
                case COMPXF_DEFLATE:
                        sa.sadb_sa_encrypt = SADB_X_CALG_DEFLATE;
                        break;
-               case COMPXF_LZS:
-                       sa.sadb_sa_encrypt = SADB_X_CALG_LZS;
-                       break;
                default:
                        warnx("unsupported compression algorithm %d",
                            xfs->compxf->id);
Index: regress/sbin/ipsecctl/sa20.in
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/regress/sbin/ipsecctl/sa20.in,v
retrieving revision 1.1
diff -u -p -r1.1 sa20.in
--- regress/sbin/ipsecctl/sa20.in       1 Jun 2006 03:14:26 -0000       1.1
+++ regress/sbin/ipsecctl/sa20.in       21 Oct 2021 22:41:10 -0000
@@ -1,3 +1,2 @@
 ipcomp from 3ffe::1 to 3ffe::2 spi 0x1000:0x1001
 ipcomp from 3ffe::3 to 3ffe::4 spi 0x2000:0x2001 comp deflate
-ipcomp from 3ffe::5 to 3ffe::6 spi 0x3000:0x3001 comp lzs
Index: regress/sbin/ipsecctl/sa20.ok
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/regress/sbin/ipsecctl/sa20.ok,v
retrieving revision 1.1
diff -u -p -r1.1 sa20.ok
--- regress/sbin/ipsecctl/sa20.ok       1 Jun 2006 03:14:26 -0000       1.1
+++ regress/sbin/ipsecctl/sa20.ok       21 Oct 2021 22:41:14 -0000
@@ -2,5 +2,3 @@ ipcomp tunnel from 3ffe::1 to 3ffe::2 sp
 ipcomp tunnel from 3ffe::2 to 3ffe::1 spi 0x00001001 comp deflate
 ipcomp tunnel from 3ffe::3 to 3ffe::4 spi 0x00002000 comp deflate
 ipcomp tunnel from 3ffe::4 to 3ffe::3 spi 0x00002001 comp deflate
-ipcomp tunnel from 3ffe::5 to 3ffe::6 spi 0x00003000 comp lzs
-ipcomp tunnel from 3ffe::6 to 3ffe::5 spi 0x00003001 comp lzs
Index: regress/sbin/ipsecctl/sa8.in
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/regress/sbin/ipsecctl/sa8.in,v
retrieving revision 1.1
diff -u -p -r1.1 sa8.in
--- regress/sbin/ipsecctl/sa8.in        30 Oct 2005 20:05:24 -0000      1.1
+++ regress/sbin/ipsecctl/sa8.in        21 Oct 2021 22:41:17 -0000
@@ -1,3 +1,2 @@
 ipcomp from 1.1.1.1 to 2.2.2.2 spi 0x1000:0x1001
 ipcomp from 3.3.3.3 to 4.4.4.4 spi 0x2000:0x2001 comp deflate
-ipcomp from 5.5.5.5 to 6.6.6.6 spi 0x3000:0x3001 comp lzs
Index: regress/sbin/ipsecctl/sa8.ok
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/regress/sbin/ipsecctl/sa8.ok,v
retrieving revision 1.2
diff -u -p -r1.2 sa8.ok
--- regress/sbin/ipsecctl/sa8.ok        12 Nov 2005 12:13:24 -0000      1.2
+++ regress/sbin/ipsecctl/sa8.ok        21 Oct 2021 22:41:20 -0000
@@ -2,5 +2,3 @@ ipcomp tunnel from 1.1.1.1 to 2.2.2.2 sp
 ipcomp tunnel from 2.2.2.2 to 1.1.1.1 spi 0x00001001 comp deflate
 ipcomp tunnel from 3.3.3.3 to 4.4.4.4 spi 0x00002000 comp deflate
 ipcomp tunnel from 4.4.4.4 to 3.3.3.3 spi 0x00002001 comp deflate
-ipcomp tunnel from 5.5.5.5 to 6.6.6.6 spi 0x00003000 comp lzs
-ipcomp tunnel from 6.6.6.6 to 5.5.5.5 spi 0x00003001 comp lzs

Reply via email to