summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
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}