mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
3911. [func] Implement EDNS EXPIRE option client side. [RT #35925]
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#define NOTIFY_DSCP_BIT 10
|
||||
#define TRANSFER_DSCP_BIT 11
|
||||
#define QUERY_DSCP_BIT 12
|
||||
#define REQUEST_EXPIRE_BIT 13
|
||||
|
||||
static void
|
||||
peerlist_delete(dns_peerlist_t **list);
|
||||
@@ -477,6 +478,32 @@ dns_peer_getrequestsit(dns_peer_t *peer, isc_boolean_t *retval) {
|
||||
return (ISC_R_NOTFOUND);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_peer_setrequestexpire(dns_peer_t *peer, isc_boolean_t newval) {
|
||||
isc_boolean_t existed;
|
||||
|
||||
REQUIRE(DNS_PEER_VALID(peer));
|
||||
|
||||
existed = DNS_BIT_CHECK(REQUEST_EXPIRE_BIT, &peer->bitflags);
|
||||
|
||||
peer->request_expire = newval;
|
||||
DNS_BIT_SET(REQUEST_EXPIRE_BIT, &peer->bitflags);
|
||||
|
||||
return (existed ? ISC_R_EXISTS : ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_peer_getrequestexpire(dns_peer_t *peer, isc_boolean_t *retval) {
|
||||
REQUIRE(DNS_PEER_VALID(peer));
|
||||
REQUIRE(retval != NULL);
|
||||
|
||||
if (DNS_BIT_CHECK(REQUEST_EXPIRE_BIT, &peer->bitflags)) {
|
||||
*retval = peer->request_expire;
|
||||
return (ISC_R_SUCCESS);
|
||||
} else
|
||||
return (ISC_R_NOTFOUND);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_peer_settransfers(dns_peer_t *peer, isc_uint32_t newval) {
|
||||
isc_boolean_t existed;
|
||||
|
Reference in New Issue
Block a user