diff options
author | Francis Dupont <fdupont@isc.org> | 2017-04-23 00:00:15 +0200 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2018-11-29 16:42:14 +0100 |
commit | dac675e14791533a2854d6531228f3e0561a5a47 (patch) | |
tree | 665cd0654c1326951a8f5b501add7457a9171df3 /keama/confparse.c | |
parent | b9ba4dd232e5dbe39ed0b6773d6f2c2ab2b4397e (diff) | |
download | isc-dhcp-dac675e14791533a2854d6531228f3e0561a5a47.tar.gz |
Checkpoint (more tests)
Diffstat (limited to 'keama/confparse.c')
-rw-r--r-- | keama/confparse.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/keama/confparse.c b/keama/confparse.c index 1ed60dfe..284b9fab 100644 --- a/keama/confparse.c +++ b/keama/confparse.c @@ -569,11 +569,6 @@ parse_statement(struct parse *cfile, int type, isc_boolean_t declaration) break; case FAILOVER: - if (type != ROOT_GROUP && type != SHARED_NET_DECL) - parse_error(cfile, "failover peers may only be %s", - "defined in shared-network\n" - "declarations and the outer scope."); - token = next_token(&val, NULL, cfile); parse_error(cfile, "No failover support."); break; @@ -588,8 +583,10 @@ parse_statement(struct parse *cfile, int type, isc_boolean_t declaration) /* ignore: ISC DHCP specific */ break; - default: unknown: + skip_token(&val, NULL, cfile); + + default: et = createMap(); TAILQ_CONCAT(&et->comments, &cfile->comments); lose = ISC_FALSE; @@ -2991,13 +2988,19 @@ find_match(struct parse *cfile, struct element *host) if (local_family == AF_INET) { address = mapGet(host, "ip-address"); - if (address == NULL) + if (address == NULL) { + if (TAILQ_EMPTY(&known_subnets)) + return cfile->stack[1]; return TAILQ_LAST(&known_subnets, subnets)->subnet; + } len = 4; } else { address = mapGet(host, "ip-addresses"); - if (address == NULL) + if (address == NULL) { + if (TAILQ_EMPTY(&known_subnets)) + return cfile->stack[1]; return TAILQ_LAST(&known_subnets, subnets)->subnet; + } address = listGet(address, 0); if (address == NULL) return TAILQ_LAST(&known_subnets, subnets)->subnet; |