Enforce *double* our packet-size-limit temporarily.
This commit is contained in:
parent
f6611fa671
commit
d5fefe5146
|
@ -229,6 +229,14 @@
|
|||
|
||||
(define (check-packet-length! actual-length limit block-size)
|
||||
(when (> actual-length limit)
|
||||
(log-warning (format "Packet of length ~v exceeded our limit of ~v"
|
||||
actual-length
|
||||
limit)))
|
||||
(when (> actual-length (* 2 limit))
|
||||
;; TODO: For some reason, OpenSSH seems to occasionally slightly
|
||||
;; exceed the packet size limit! (For example, sending a packet of
|
||||
;; length 65564 when I'm expecting a max of 65536.) So we actually
|
||||
;; enforce twice our actual limit.
|
||||
(disconnect-with-error 0 ;; TODO: better reason code?
|
||||
"Packet of length ~v is longer than packet limit ~v"
|
||||
actual-length
|
||||
|
|
Loading…
Reference in New Issue