rpl: use ADJUST do_not_reply instead of IGNORE

parent fc99b20f
......@@ -4,7 +4,7 @@
" au BufRead,BufNewFile *.rpl set filetype=deckard
" au BufRead,BufNewFile *.stc set foldmethod=syntax
syntax keyword Keyword MATCH STEP ADJUST MANDATORY RAW IGNORE
syntax keyword Keyword MATCH STEP ADJUST MANDATORY RAW
syntax keyword Structure CONFIG_END
syntax keyword Function CHECK_ANSWER QUERY TIME_PASSES
......
......@@ -33,17 +33,16 @@ let hex_re = /[0-9a-fA-F]+/
let match_option = "opcode" | "qtype" | "qcase" | "qname" | "subdomain" | "flags" | "rcode" | "question" | "answer" | "authority" | "additional" | "all" | "edns"
let adjust_option = "copy_id" | "copy_query" | "raw_id"
let adjust_option = "copy_id" | "copy_query" | "raw_id" | "do_not_answer"
let reply_option = "QR" | "TC" | "AA" | "AD" | "RD" | "RA" | "CD" | "DO" | "NOERROR" | "FORMERR" | "SERVFAIL" | "NXDOMAIN" | "NOTIMP" | "REFUSED" | "YXDOMAIN" | "YXRRSET" | "NXRRSET" | "NOTAUTH" | "NOTZONE" | "BADVERS" | "BADSIG" | "BADKEY" | "BADTIME" | "BADMODE" | "BADNAME" | "BADALG" | "BADTRUNC" | "BADCOOKIE"
let step_option = "REPLY" | "QUERY" | "CHECK_ANSWER" | "CHECK_OUT_QUERY" | /TIME_PASSES[ \t]+ELAPSE/
let ignore = [del_str "IGNORE" . label "ignore" . value "true" . comment_or_eol]
let mandatory = [del_str "MANDATORY" . label "mandatory" . value "true" . comment_or_eol]
let tsig = [del_str "TSIG" . label "tsig" . space . [label "keyname" . store word] . space . [label "secret" . store word] . comment_or_eol]
let match = (ignore | mandatory | tsig)* . [ label "match_present" . value "true" . del_str "MATCH" ] . [space . label "match" . store match_option ]+ . comment_or_eol
let adjust = (ignore | mandatory | tsig)* . del_str "ADJUST" . [space . label "adjust" . store adjust_option ]+ . comment_or_eol
let reply = (ignore | mandatory | tsig)* . del ("REPLY" | "FLAGS") "REPLY" . [space . label "reply" . store reply_option ]+ . comment_or_eol
let match = (mandatory | tsig)* . [ label "match_present" . value "true" . del_str "MATCH" ] . [space . label "match" . store match_option ]+ . comment_or_eol
let adjust = (mandatory | tsig)* . del_str "ADJUST" . [space . label "adjust" . store adjust_option ]+ . comment_or_eol
let reply = (mandatory | tsig)* . del ("REPLY" | "FLAGS") "REPLY" . [space . label "reply" . store reply_option ]+ . comment_or_eol
let question = [label "record" . domain . tab . (class . tab)? . type . comment_or_eol ]
......
......@@ -173,12 +173,6 @@ class Entry:
except (KeyError, IndexError):
self.mandatory = None
# IGNORE
try:
self.ignore = list(node.match("/ignore"))[0]
except (KeyError, IndexError):
self.ignore = None
# TSIG
self.process_tsig()
......
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