Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nbd-server infinite loop for TLS
When the nbd-client disconnects from a TLS connection, the gnutls_record_recv function will return a zero value. Due to a faulty/missing check, this causes the readit_tls call to enter an infinite loop, with all terrible consequences that this has. This is a very problematic bug that causes a full CPU usage, and is only treatable by killing the nbd-server. This fix adds the missing check and an appropriate message that terminates the forked server child graceously. Signed-off-by: Janis Kalofolias <[email protected]>
- Loading branch information