2
0
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:
Mark Andrews
2014-08-06 11:50:40 +10:00
parent a338c2d947
commit 43b9737b11
17 changed files with 267 additions and 28 deletions

View File

@@ -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;