Merge branch '2917-preserve-the-contents-of-tcp-buffer' into 'main'
Preserve the contents of socket buffer on realloc Closes #2917 See merge request isc-projects/bind9!5437
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
||||
5722. [bug] Preserve the contents of TCPDNS and TLSDNS receive
|
||||
buffer when growing the buffer size. [GL #2917]
|
||||
|
||||
5721. [func] New isc_mem_reget() realloc-like function was
|
||||
introduced into the libisc API, and zero-sized
|
||||
allocations now return non-NULL pointers. [GL !5440]
|
||||
|
||||
@@ -62,3 +62,6 @@ Bug Fixes
|
||||
- When new IP addresses were added to the system during ``named``
|
||||
startup, ``named`` failed to listen on TCP for the newly added
|
||||
interfaces. :gl:`#2852`
|
||||
|
||||
- Under specific circumstances, zone transfers over TCP and TLS could be
|
||||
interrupted prematurely. This has been fixed. :gl:`#2917`
|
||||
|
||||
@@ -1894,8 +1894,8 @@ isc__nm_alloc_dnsbuf(isc_nmsocket_t *sock, size_t len) {
|
||||
sock->buf_size = alloc_len;
|
||||
} else {
|
||||
/* We have the buffer but it's too small */
|
||||
isc_mem_put(sock->mgr->mctx, sock->buf, sock->buf_size);
|
||||
sock->buf = isc_mem_get(sock->mgr->mctx, NM_BIG_BUF);
|
||||
sock->buf = isc_mem_reget(sock->mgr->mctx, sock->buf,
|
||||
sock->buf_size, NM_BIG_BUF);
|
||||
sock->buf_size = NM_BIG_BUF;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user