]> git.ipfire.org Git - thirdparty/bind9.git/commit
Return HTTP status code for small/malformed requests
authorArtem Boldariev <artem@boldariev.com>
Tue, 6 Jul 2021 13:36:17 +0000 (16:36 +0300)
committerArtem Boldariev <artem@boldariev.com>
Fri, 9 Jul 2021 13:37:08 +0000 (16:37 +0300)
commitc6d0e3d3a7842b44eb7ed2c4946296908031ef03
treeebca004b8f86a91f6d7f92ef4ef3b156d6a50588
parentdebd0241f784792e5b96d7b5fa8a3037d756d132
Return HTTP status code for small/malformed requests

This commit makes BIND return HTTP status codes for malformed or too
small requests.

DNS request processing code would ignore such requests. Such an
approach works well for other DNS transport but does not make much
sense for HTTP, not allowing it to complete the request/response
sequence.

Suppose execution has reached the point where DNS message handling
code has been called. In that case, it means that the HTTP request has
been successfully processed, and, thus, we are expected to respond to
it either with a message containing some DNS payload or at least to
return an error status code. This commit ensures that BIND behaves
this way.
lib/isc/include/isc/netmgr.h
lib/isc/netmgr/http.c
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/ns/client.c