mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
in dns_name_isabsolute(), dns_name_fullcompare(),
and dns_name_compare(), do not require that the name has >0 labels so that these functions can be used on the degenerate relative name @
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: name.h,v 1.78 2000/08/01 01:24:22 tale Exp $ */
|
/* $Id: name.h,v 1.79 2000/08/08 23:18:12 gson Exp $ */
|
||||||
|
|
||||||
#ifndef DNS_NAME_H
|
#ifndef DNS_NAME_H
|
||||||
#define DNS_NAME_H 1
|
#define DNS_NAME_H 1
|
||||||
@@ -335,8 +335,6 @@ dns_name_isabsolute(const dns_name_t *name);
|
|||||||
* Requires:
|
* Requires:
|
||||||
* 'name' is a valid name
|
* 'name' is a valid name
|
||||||
*
|
*
|
||||||
* dns_name_countlabels(name) > 0
|
|
||||||
*
|
|
||||||
* Returns:
|
* Returns:
|
||||||
* TRUE The last label in 'name' is the root label.
|
* TRUE The last label in 'name' is the root label.
|
||||||
* FALSE The last label in 'name' is not the root label.
|
* FALSE The last label in 'name' is not the root label.
|
||||||
@@ -454,12 +452,8 @@ dns_name_compare(const dns_name_t *name1, const dns_name_t *name2);
|
|||||||
* Requires:
|
* Requires:
|
||||||
* 'name1' is a valid name
|
* 'name1' is a valid name
|
||||||
*
|
*
|
||||||
* dns_name_countlabels(name1) > 0
|
|
||||||
*
|
|
||||||
* 'name2' is a valid name
|
* 'name2' is a valid name
|
||||||
*
|
*
|
||||||
* dns_name_countlabels(name2) > 0
|
|
||||||
*
|
|
||||||
* Either name1 is absolute and name2 is absolute, or neither is.
|
* Either name1 is absolute and name2 is absolute, or neither is.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
@@ -534,12 +528,8 @@ dns_name_issubdomain(const dns_name_t *name1, const dns_name_t *name2);
|
|||||||
* Requires:
|
* Requires:
|
||||||
* 'name1' is a valid name
|
* 'name1' is a valid name
|
||||||
*
|
*
|
||||||
* dns_name_countlabels(name1) > 0
|
|
||||||
*
|
|
||||||
* 'name2' is a valid name
|
* 'name2' is a valid name
|
||||||
*
|
*
|
||||||
* dns_name_countlabels(name2) > 0
|
|
||||||
*
|
|
||||||
* Either name1 is absolute and name2 is absolute, or neither is.
|
* Either name1 is absolute and name2 is absolute, or neither is.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: name.c,v 1.100 2000/08/01 01:22:33 tale Exp $ */
|
/* $Id: name.c,v 1.101 2000/08/08 23:18:10 gson Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -383,7 +383,6 @@ dns_name_isabsolute(const dns_name_t *name) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
REQUIRE(VALID_NAME(name));
|
REQUIRE(VALID_NAME(name));
|
||||||
REQUIRE(name->labels > 0);
|
|
||||||
|
|
||||||
if ((name->attributes & DNS_NAMEATTR_ABSOLUTE) != 0)
|
if ((name->attributes & DNS_NAMEATTR_ABSOLUTE) != 0)
|
||||||
return (ISC_TRUE);
|
return (ISC_TRUE);
|
||||||
@@ -509,9 +508,7 @@ dns_name_fullcompare(const dns_name_t *name1, const dns_name_t *name2,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
REQUIRE(VALID_NAME(name1));
|
REQUIRE(VALID_NAME(name1));
|
||||||
REQUIRE(name1->labels > 0);
|
|
||||||
REQUIRE(VALID_NAME(name2));
|
REQUIRE(VALID_NAME(name2));
|
||||||
REQUIRE(name2->labels > 0);
|
|
||||||
REQUIRE(orderp != NULL);
|
REQUIRE(orderp != NULL);
|
||||||
REQUIRE(nlabelsp != NULL);
|
REQUIRE(nlabelsp != NULL);
|
||||||
REQUIRE(nbitsp != NULL);
|
REQUIRE(nbitsp != NULL);
|
||||||
|
Reference in New Issue
Block a user