summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-05-15 14:37:39 +1000
committerDamien Miller <djm@mindrot.org>2014-05-15 14:37:39 +1000
commitc31a0cd5b31961f01c5b731f62a6cb9d4f767472 (patch)
treef0ef8c1ba5c43751f91c355243142ab71f611e98 /packet.c
parent686c7d9ee6f44b2be4128d7860b6b37adaeba733 (diff)
- markus@cvs.openbsd.org 2014/05/03 17:20:34
[monitor.c packet.c packet.h] unbreak compression, by re-init-ing the compression code in the post-auth child. the new buffer code is more strict, and requires buffer_init() while the old code was happy after a bzero(); originally from djm@
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/packet.c b/packet.c
index c7c18f308..3dd66d7d9 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.195 2014/04/29 18:01:49 markus Exp $ */ 1/* $OpenBSD: packet.c,v 1.196 2014/05/03 17:20:34 markus 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
@@ -2059,3 +2059,23 @@ packet_restore_state(void)
2059 add_recv_bytes(len); 2059 add_recv_bytes(len);
2060 } 2060 }
2061} 2061}
2062
2063/* Reset after_authentication and reset compression in post-auth privsep */
2064void
2065packet_set_postauth(void)
2066{
2067 Comp *comp;
2068 int mode;
2069
2070 debug("%s: called", __func__);
2071 /* This was set in net child, but is not visible in user child */
2072 active_state->after_authentication = 1;
2073 active_state->rekeying = 0;
2074 for (mode = 0; mode < MODE_MAX; mode++) {
2075 if (active_state->newkeys[mode] == NULL)
2076 continue;
2077 comp = &active_state->newkeys[mode]->comp;
2078 if (comp && comp->enabled)
2079 packet_init_compression();
2080 }
2081}