mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
add test support for dropping edns messages (-T dropedns); ignoring edns in queries (-T noedns); variable max UDP (-T maxudp=value)
This commit is contained in:
@@ -1765,7 +1765,7 @@ doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
|
||||
}
|
||||
/*
|
||||
* Simulate a firewall blocking UDP responses bigger than
|
||||
* 512 bytes.
|
||||
* 'maxudp' bytes.
|
||||
*/
|
||||
if (sock->manager->maxudp != 0 && cc > sock->manager->maxudp)
|
||||
return (DOIO_SOFT);
|
||||
@@ -1859,7 +1859,12 @@ doio_send(isc__socket_t *sock, isc_socketevent_t *dev) {
|
||||
build_msghdr_send(sock, dev, &msghdr, iov, &write_count);
|
||||
|
||||
resend:
|
||||
cc = sendmsg(sock->fd, &msghdr, 0);
|
||||
if (sock->type == isc_sockettype_udp &&
|
||||
sock->manager->maxudp != 0 &&
|
||||
write_count > (size_t)sock->manager->maxudp)
|
||||
cc = write_count;
|
||||
else
|
||||
cc = sendmsg(sock->fd, &msghdr, 0);
|
||||
send_errno = errno;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user