summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2020-01-23 10:24:29 +0000
committerDarren Tucker <dtucker@dtucker.net>2020-01-23 21:53:54 +1100
commit7f8e66fea8c4e2a910df9067cb7638999b7764d5 (patch)
tree88c1a4a73a03cfa993fee0c1f23b6327ef1351a1 /readconf.c
parent69ac4e33023b379e9a8e9b4b6aeeffa6d1fcf6fa (diff)
upstream: Make zlib optional. This adds a "ZLIB" build time option
that allows building without zlib compression and associated options. With feedback from markus@, ok djm@ OpenBSD-Commit-ID: 44c6e1133a90fd15a3aa865bdedc53bab28b7910
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/readconf.c b/readconf.c
index 59443bfdb..b25984548 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.321 2020/01/23 07:10:22 dtucker Exp $ */ 1/* $OpenBSD: readconf.c,v 1.322 2020/01/23 10:24:29 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -837,6 +837,13 @@ static const struct multistate multistate_canonicalizehostname[] = {
837 { "always", SSH_CANONICALISE_ALWAYS }, 837 { "always", SSH_CANONICALISE_ALWAYS },
838 { NULL, -1 } 838 { NULL, -1 }
839}; 839};
840static const struct multistate multistate_compression[] = {
841#ifdef WITH_ZLIB
842 { "yes", COMP_ZLIB },
843#endif
844 { "no", COMP_NONE },
845 { NULL, -1 }
846};
840 847
841/* 848/*
842 * Processes a single option line as used in the configuration files. This 849 * Processes a single option line as used in the configuration files. This
@@ -1046,7 +1053,8 @@ parse_time:
1046 1053
1047 case oCompression: 1054 case oCompression:
1048 intptr = &options->compression; 1055 intptr = &options->compression;
1049 goto parse_flag; 1056 multistate_ptr = multistate_compression;
1057 goto parse_multistate;
1050 1058
1051 case oTCPKeepAlive: 1059 case oTCPKeepAlive:
1052 intptr = &options->tcp_keep_alive; 1060 intptr = &options->tcp_keep_alive;