diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: monitor.c,v 1.102 2009/05/25 06:48:01 andreas Exp $ */ | 1 | /* $OpenBSD: monitor.c,v 1.103 2009/05/28 16:50:16 andreas Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> | 3 | * Copyright 2002 Niels Provos <provos@citi.umich.edu> |
4 | * Copyright 2002 Markus Friedl <markus@openbsd.org> | 4 | * Copyright 2002 Markus Friedl <markus@openbsd.org> |
@@ -125,6 +125,8 @@ struct { | |||
125 | u_int ilen; | 125 | u_int ilen; |
126 | u_char *output; | 126 | u_char *output; |
127 | u_int olen; | 127 | u_int olen; |
128 | u_int64_t sent_bytes; | ||
129 | u_int64_t recv_bytes; | ||
128 | } child_state; | 130 | } child_state; |
129 | 131 | ||
130 | /* Functions on the monitor that answer unprivileged requests */ | 132 | /* Functions on the monitor that answer unprivileged requests */ |
@@ -1679,6 +1681,10 @@ monitor_apply_keystate(struct monitor *pmonitor) | |||
1679 | child_state.olen); | 1681 | child_state.olen); |
1680 | memset(child_state.output, 0, child_state.olen); | 1682 | memset(child_state.output, 0, child_state.olen); |
1681 | xfree(child_state.output); | 1683 | xfree(child_state.output); |
1684 | |||
1685 | /* Roaming */ | ||
1686 | if (compat20) | ||
1687 | roam_set_bytes(child_state.sent_bytes, child_state.recv_bytes); | ||
1682 | } | 1688 | } |
1683 | 1689 | ||
1684 | static Kex * | 1690 | static Kex * |
@@ -1794,6 +1800,12 @@ mm_get_keystate(struct monitor *pmonitor) | |||
1794 | child_state.input = buffer_get_string(&m, &child_state.ilen); | 1800 | child_state.input = buffer_get_string(&m, &child_state.ilen); |
1795 | child_state.output = buffer_get_string(&m, &child_state.olen); | 1801 | child_state.output = buffer_get_string(&m, &child_state.olen); |
1796 | 1802 | ||
1803 | /* Roaming */ | ||
1804 | if (compat20) { | ||
1805 | child_state.sent_bytes = buffer_get_int64(&m); | ||
1806 | child_state.recv_bytes = buffer_get_int64(&m); | ||
1807 | } | ||
1808 | |||
1797 | buffer_free(&m); | 1809 | buffer_free(&m); |
1798 | } | 1810 | } |
1799 | 1811 | ||