Commit 9a1eea84 authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Daniel Salzman

knot_dname_in(): remove

parent f77858eb
......@@ -41,7 +41,6 @@ libknot.so.7 libknot7 #MINVER#
knot_dname_copy_part@Base 2.3.0
knot_dname_free@Base 2.3.0
knot_dname_from_str@Base 2.3.0
knot_dname_in@Base 2.3.0
knot_dname_is_equal@Base 2.3.0
knot_dname_is_wildcard@Base 2.3.0
knot_dname_label_is_equal@Base 2.6.0
......
......@@ -636,7 +636,7 @@ static int ixfr_step(const knot_rrset_t *rr, struct refresh_data *data)
static int ixfr_consume_rr(const knot_rrset_t *rr, struct refresh_data *data)
{
if (!knot_dname_in(data->zone->name, rr->owner)) {
if (knot_dname_in_bailiwick(rr->owner, data->zone->name) < 0) {
return KNOT_STATE_CONSUME;
}
......
......@@ -201,7 +201,7 @@ static int process_prereq(const knot_rrset_t *rrset, uint16_t qclass,
return KNOT_EMALF;
}
if (!knot_dname_in(update->zone->name, rrset->owner)) {
if (knot_dname_in_bailiwick(rrset->owner, update->zone->name) < 0) {
*rcode = KNOT_RCODE_NOTZONE;
return KNOT_EOUTOFZONE;
}
......
......@@ -149,7 +149,7 @@ static int discover_additionals(const knot_dname_t *owner, struct rr_data *rr_da
glue_t *glue;
if ((node->flags & (NODE_FLAGS_DELEG | NODE_FLAGS_NONAUTH)) &&
rr_data->type == KNOT_RRTYPE_NS &&
knot_dname_in(owner, node->owner)) {
knot_dname_in_bailiwick(node->owner, owner) >= 0) {
glue = &mandatory[mandatory_count++];
glue->optional = false;
} else {
......@@ -818,7 +818,7 @@ int zone_contents_find_dname(const zone_contents_t *zone,
return KNOT_EINVAL;
}
if (!knot_dname_in(zone->apex->owner, name)) {
if (knot_dname_in_bailiwick(name, zone->apex->owner) < 0) {
return KNOT_EOUTOFZONE;
}
......
......@@ -325,20 +325,4 @@ uint8_t *knot_dname_lf(const knot_dname_t *src, knot_dname_storage_t storage);
*/
int knot_dname_in_bailiwick(const knot_dname_t *name, const knot_dname_t *bailiwick);
/*!
* \brief Check if the domain name is a subdomain of or equal to other.
*
* \param domain Domain name to be the possible parent domain.
* \param sub Domain name to be the possible subdomain.
*
* \retval true \a sub us a subdomain or equal to \a domain.
* \retval false otherwise.
*/
static inline
bool knot_dname_in(const knot_dname_t *domain, const knot_dname_t *sub)
{
return knot_dname_in_bailiwick(sub, domain) >= 0;
}
/*! @} */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment