Tidy up CNAME representaion.

Use an explicit discriminator for the target union.
This commit is contained in:
Simon Kelley
2019-10-30 12:58:28 +00:00
parent 376cb97685
commit 1fd56c0e33
3 changed files with 15 additions and 21 deletions

View File

@@ -289,7 +289,8 @@ union all_addr {
struct crec *cache;
char *name;
} target;
unsigned int uid; /* 0 if union is char * */
unsigned int uid;
int is_name_ptr; /* disciminates target union */
} cname;
struct {
struct blockdata *keydata;
@@ -483,10 +484,6 @@ struct crec {
#define UID_NONE 0
/* Values of uid in crecs with F_CONFIG bit set. */
/* cname to uid SRC_PTR are to locally-configured CNAME
so use UID_NONE for that to
eliminate clashes with any other uid */
#define SRC_PTR UID_NONE
#define SRC_CONFIG 1
#define SRC_HOSTS 2
#define SRC_AH 3