Commit c95b2535 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[trac551] Handle grand-children wildcards

parent 91a8eaa5
...@@ -392,21 +392,20 @@ struct MemoryZone::MemoryZoneImpl { ...@@ -392,21 +392,20 @@ struct MemoryZone::MemoryZoneImpl {
* No redirection anywhere. Let's try if it is a wildcard. * No redirection anywhere. Let's try if it is a wildcard.
*/ */
if (node->getFlag(DOMAINFLAG_WILD)) { if (node->getFlag(DOMAINFLAG_WILD)) {
Name wildcard(Name("*").concatenate(name.split(1))); Name wildcard(Name("*").concatenate(
switch (domains_.find(wildcard, &node)) node_path.getAbsoluteName()));
{ DomainTree::Result result(domains_.find(wildcard, &node));
case DomainTree::EXACTMATCH: /*
// This is the node we want. * Otherwise, why would the DOMAINFLAG_WILD be there if
break; * there was no wildcard under it?
default: */
// This wildcard is not here. It means we want assert(result = DomainTree::EXACTMATCH);
// something like a.b.wildcard.example.org /*
// and have only *.wildcard.example.org and * We have the wildcard node now. Jump below the switch,
// we don't want that. * where handling of the common (exact-match) case is.
return (FindResult(NXDOMAIN, ConstRRsetPtr())); *
} * TODO: Some synthesis of RRsets for the wildcard node.
// If we got here, we have the wildcard node. Jump to */
// EXACTMATCH
break; break;
} }
......
Supports Markdown
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