version 1.306, 2022/01/21 06:58:06 |
version 1.307, 2022/01/22 00:49:34 |
|
|
return 0; |
return 0; |
} |
} |
|
|
|
/* Reads and buffers data from the specified fd */ |
|
int |
|
ssh_packet_process_read(struct ssh *ssh, int fd) |
|
{ |
|
struct session_state *state = ssh->state; |
|
int r; |
|
size_t rlen; |
|
|
|
if ((r = sshbuf_read(fd, state->input, PACKET_MAX_SIZE, &rlen)) != 0) |
|
return r; |
|
|
|
if (state->packet_discard) { |
|
if ((r = sshbuf_consume_end(state->input, rlen)) != 0) |
|
return r; |
|
state->keep_alive_timeouts = 0; /* ?? */ |
|
if (rlen >= state->packet_discard) { |
|
if ((r = ssh_packet_stop_discard(ssh)) != 0) |
|
return r; |
|
} |
|
state->packet_discard -= rlen; |
|
return 0; |
|
} |
|
return 0; |
|
} |
|
|
int |
int |
ssh_packet_remaining(struct ssh *ssh) |
ssh_packet_remaining(struct ssh *ssh) |
{ |
{ |