diff options
author | Damien Miller <djm@mindrot.org> | 1999-11-21 13:23:52 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-11-21 13:23:52 +1100 |
commit | 6162d1215bbff30cf0c4c19368dc85ae570d44ca (patch) | |
tree | f82956b4429cad04a2296a1ede65e147bafb92f4 /packet.c | |
parent | f58db38f8d396ee5ea42975d9409a644e01cede8 (diff) |
- OpenBSD CVS Changes
- [channels.c]
make this compile, bad markus
- [log.c readconf.c servconf.c ssh.h]
bugfix: loglevels are per host in clientconfig,
factor out common log-level parsing code.
- [servconf.c]
remove unused index (-Wall)
- [ssh-agent.c]
only one 'extern char *__progname'
- [sshd.8]
document SIGHUP, -Q to synopsis
- [sshconnect.c serverloop.c sshd.c packet.c packet.h]
[channels.c clientloop.c]
SSH_CMSG_MAX_PACKET_SIZE, some clients use this, some need this, niels@
[hope this time my ISP stays alive during commit]
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -15,7 +15,7 @@ with the other side. This same code is used both on client and server side. */ #include "includes.h" -RCSID("$Id: packet.c,v 1.3 1999/11/16 02:37:16 damien Exp $"); +RCSID("$Id: packet.c,v 1.4 1999/11/21 02:23:53 damien Exp $"); #include "xmalloc.h" #include "buffer.h" @@ -66,6 +66,9 @@ static Buffer compression_buffer; /* Flag indicating whether packet compression/decompression is enabled. */ static int packet_compression = 0; +/* default maximum packet size */ +int max_packet_size = 32768; + /* Flag indicating whether this module has been initialized. */ static int initialized = 0; @@ -745,3 +748,20 @@ packet_is_interactive() { return interactive_mode; } + +int +packet_set_maxsize(int s) +{ + static int called = 0; + if (called) { + log("packet_set_maxsize: called twice: old %d new %d", max_packet_size, s); + return -1; + } + if (s < 4*1024 || s > 1024*1024) { + log("packet_set_maxsize: bad size %d", s); + return -1; + } + log("packet_set_maxsize: setting to %d", s); + max_packet_size = s; + return s; +} |