diff options
author | 2017-04-30 23:26:54 +0000 | |
---|---|---|
committer | 2017-04-30 23:26:54 +0000 | |
commit | 0ccaed78deef9477c51d39cd8df049e65cd78ecc (patch) | |
tree | da25d72b8168099c2013bf56fc70c0d5bdf874f1 /usr.bin/ssh/ttymodes.c | |
parent | remove the (in)famous SSHv1 CRC compensation attack detector. (diff) | |
download | wireguard-openbsd-0ccaed78deef9477c51d39cd8df049e65cd78ecc.tar.xz wireguard-openbsd-0ccaed78deef9477c51d39cd8df049e65cd78ecc.zip |
purge the last traces of SSHv1 from the TTY modes handling code
ok markus
Diffstat (limited to 'usr.bin/ssh/ttymodes.c')
-rw-r--r-- | usr.bin/ssh/ttymodes.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/usr.bin/ssh/ttymodes.c b/usr.bin/ssh/ttymodes.c index 3b9c400041d..09729ba04f8 100644 --- a/usr.bin/ssh/ttymodes.c +++ b/usr.bin/ssh/ttymodes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttymodes.c,v 1.31 2017/04/30 23:13:25 djm Exp $ */ +/* $OpenBSD: ttymodes.c,v 1.32 2017/04/30 23:26:54 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -57,12 +57,10 @@ #define TTY_OP_END 0 /* - * uint32 (u_int) follows speed in SSH1 and SSH2 + * uint32 (u_int) follows speed. */ -#define TTY_OP_ISPEED_PROTO1 192 -#define TTY_OP_OSPEED_PROTO1 193 -#define TTY_OP_ISPEED_PROTO2 128 -#define TTY_OP_OSPEED_PROTO2 129 +#define TTY_OP_ISPEED 128 +#define TTY_OP_OSPEED 129 /* * Converts POSIX speed_t to a baud rate. The values of the @@ -254,11 +252,8 @@ tty_make_modes(int fd, struct termios *tiop) struct termios tio; int baud; Buffer buf; - int tty_op_ospeed, tty_op_ispeed; buffer_init(&buf); - tty_op_ospeed = TTY_OP_OSPEED_PROTO2; - tty_op_ispeed = TTY_OP_ISPEED_PROTO2; if (tiop == NULL) { if (fd == -1) { @@ -274,10 +269,10 @@ tty_make_modes(int fd, struct termios *tiop) /* Store input and output baud rates. */ baud = speed_to_baud(cfgetospeed(&tio)); - buffer_put_char(&buf, tty_op_ospeed); + buffer_put_char(&buf, TTY_OP_OSPEED); buffer_put_int(&buf, baud); baud = speed_to_baud(cfgetispeed(&tio)); - buffer_put_char(&buf, tty_op_ispeed); + buffer_put_char(&buf, TTY_OP_ISPEED); buffer_put_int(&buf, baud); /* Store values of mode flags. */ @@ -334,9 +329,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr) case TTY_OP_END: goto set; - /* XXX: future conflict possible */ - case TTY_OP_ISPEED_PROTO1: - case TTY_OP_ISPEED_PROTO2: + case TTY_OP_ISPEED: n_bytes += 4; baud = packet_get_int(); if (failure != -1 && @@ -344,9 +337,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr) error("cfsetispeed failed for %d", baud); break; - /* XXX: future conflict possible */ - case TTY_OP_OSPEED_PROTO1: - case TTY_OP_OSPEED_PROTO2: + case TTY_OP_OSPEED: n_bytes += 4; baud = packet_get_int(); if (failure != -1 && |