"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "zparser.y" between
nsd-4.3.5.tar.gz and nsd-4.3.6.tar.gz

About: NSD is an authoritative only, high performance, simple name server daemon.

zparser.y  (nsd-4.3.5):zparser.y  (nsd-4.3.6)
skipping to change at line 75 skipping to change at line 75
%token <type> T_MINFO T_RP T_AFSDB T_X25 T_ISDN T_RT T_NSAP T_NSAP_PTR T_PX %token <type> T_MINFO T_RP T_AFSDB T_X25 T_ISDN T_RT T_NSAP T_NSAP_PTR T_PX
%token <type> T_GPOS T_EID T_NIMLOC T_ATMA T_NAPTR T_KX T_A6 T_DNAME T_SINK %token <type> T_GPOS T_EID T_NIMLOC T_ATMA T_NAPTR T_KX T_A6 T_DNAME T_SINK
%token <type> T_OPT T_APL T_UINFO T_UID T_GID T_UNSPEC T_TKEY T_TSIG T_IXFR %token <type> T_OPT T_APL T_UINFO T_UID T_GID T_UNSPEC T_TKEY T_TSIG T_IXFR
%token <type> T_AXFR T_MAILB T_MAILA T_DS T_DLV T_SSHFP T_RRSIG T_NSEC T_DNSKEY %token <type> T_AXFR T_MAILB T_MAILA T_DS T_DLV T_SSHFP T_RRSIG T_NSEC T_DNSKEY
%token <type> T_SPF T_NSEC3 T_IPSECKEY T_DHCID T_NSEC3PARAM T_TLSA T_URI %token <type> T_SPF T_NSEC3 T_IPSECKEY T_DHCID T_NSEC3PARAM T_TLSA T_URI
%token <type> T_NID T_L32 T_L64 T_LP T_EUI48 T_EUI64 T_CAA T_CDS T_CDNSKEY %token <type> T_NID T_L32 T_L64 T_LP T_EUI48 T_EUI64 T_CAA T_CDS T_CDNSKEY
%token <type> T_OPENPGPKEY T_CSYNC T_ZONEMD T_AVC T_SMIMEA %token <type> T_OPENPGPKEY T_CSYNC T_ZONEMD T_AVC T_SMIMEA
/* other tokens */ /* other tokens */
%token DOLLAR_TTL DOLLAR_ORIGIN NL SP %token DOLLAR_TTL DOLLAR_ORIGIN NL SP
%token <data> STR PREV BITLAB %token <data> QSTR STR PREV BITLAB
%token <ttl> T_TTL %token <ttl> T_TTL
%token <klass> T_RRCLASS %token <klass> T_RRCLASS
/* unknown RRs */ /* unknown RRs */
%token URR %token URR
%token <type> T_UTYPE %token <type> T_UTYPE
%type <type> type_and_rdata %type <type> type_and_rdata
%type <domain> owner dname abs_dname %type <domain> owner dname abs_dname
%type <dname> rel_dname label %type <dname> rel_dname label
%type <data> wire_dname wire_abs_dname wire_rel_dname wire_label %type <data> wire_dname wire_abs_dname wire_rel_dname wire_label
%type <data> concatenated_str_seq str_sp_seq str_dot_seq dotted_str %type <data> str concatenated_str_seq str_sp_seq str_dot_seq
%type <data> unquoted_dotted_str dotted_str
%type <data> nxt_seq nsec_more %type <data> nxt_seq nsec_more
%type <unknown> rdata_unknown %type <unknown> rdata_unknown
%% %%
lines: /* empty file */ lines: /* empty file */
| lines line | lines line
; ;
line: NL line: NL
| sp NL | sp NL
skipping to change at line 143 skipping to change at line 144
parser->error_occurred = 0; parser->error_occurred = 0;
} }
| error NL | error NL
; ;
/* needed to cope with ( and ) in arbitrary places */ /* needed to cope with ( and ) in arbitrary places */
sp: SP sp: SP
| sp SP | sp SP
; ;
str: STR | QSTR;
trail: NL trail: NL
| sp NL | sp NL
; ;
ttl_directive: DOLLAR_TTL sp STR trail ttl_directive: DOLLAR_TTL sp str trail
{ {
parser->default_ttl = zparser_ttl2int($3.str, &(parser->error_occurre d)); parser->default_ttl = zparser_ttl2int($3.str, &(parser->error_occurre d));
if (parser->error_occurred == 1) { if (parser->error_occurred == 1) {
parser->default_ttl = DEFAULT_TTL; parser->default_ttl = DEFAULT_TTL;
parser->error_occurred = 0; parser->error_occurred = 0;
} }
} }
; ;
origin_directive: DOLLAR_ORIGIN sp abs_dname trail origin_directive: DOLLAR_ORIGIN sp abs_dname trail
skipping to change at line 259 skipping to change at line 262
| rel_dname '.' | rel_dname '.'
{ {
if ($1 != error_dname) { if ($1 != error_dname) {
$$ = domain_table_insert(parser->db->domains, $1); $$ = domain_table_insert(parser->db->domains, $1);
} else { } else {
$$ = error_domain; $$ = error_domain;
} }
} }
; ;
label: STR label: str
{ {
if ($1.len > MAXLABELLEN) { if ($1.len > MAXLABELLEN) {
zc_error("label exceeds %d character limit", MAXLABELLEN); zc_error("label exceeds %d character limit", MAXLABELLEN);
$$ = error_dname; $$ = error_dname;
} else if ($1.len <= 0) { } else if ($1.len <= 0) {
zc_error("zero label length"); zc_error("zero label length");
$$ = error_dname; $$ = error_dname;
} else { } else {
$$ = dname_make_from_label(parser->rr_region, $$ = dname_make_from_label(parser->rr_region,
(uint8_t *) $1.str, (uint8_t *) $1.str,
skipping to change at line 355 skipping to change at line 358
$$.len = $1.len + 1; $$.len = $1.len + 1;
if ($$.len > MAXDOMAINLEN) if ($$.len > MAXDOMAINLEN)
zc_error("domain name exceeds %d character limit", zc_error("domain name exceeds %d character limit",
MAXDOMAINLEN); MAXDOMAINLEN);
$$.str = (char *) region_alloc(parser->rr_region, $$.len); $$.str = (char *) region_alloc(parser->rr_region, $$.len);
memcpy($$.str, $1.str, $1.len); memcpy($$.str, $1.str, $1.len);
$$.str[$1.len] = 0; $$.str[$1.len] = 0;
} }
; ;
wire_label: STR wire_label: str
{ {
char *result = (char *) region_alloc(parser->rr_region, char *result = (char *) region_alloc(parser->rr_region,
$1.len + 1); $1.len + 1);
if ($1.len > MAXLABELLEN) if ($1.len > MAXLABELLEN)
zc_error("label exceeds %d character limit", MAXLABELLEN); zc_error("label exceeds %d character limit", MAXLABELLEN);
/* make label anyway */ /* make label anyway */
result[0] = $1.len; result[0] = $1.len;
memmove(result+1, $1.str, $1.len); memmove(result+1, $1.str, $1.len);
skipping to change at line 385 skipping to change at line 388
$$.len = $1.len + $3.len; $$.len = $1.len + $3.len;
if ($$.len > MAXDOMAINLEN) if ($$.len > MAXDOMAINLEN)
zc_error("domain name exceeds %d character limit", zc_error("domain name exceeds %d character limit",
MAXDOMAINLEN); MAXDOMAINLEN);
$$.str = (char *) region_alloc(parser->rr_region, $$.len); $$.str = (char *) region_alloc(parser->rr_region, $$.len);
memmove($$.str, $1.str, $1.len); memmove($$.str, $1.str, $1.len);
memmove($$.str + $1.len, $3.str, $3.len); memmove($$.str + $1.len, $3.str, $3.len);
} }
; ;
str_seq: dotted_str str_seq: unquoted_dotted_str
{
zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $1.str
, $1.len), 1);
}
| QSTR
{ {
zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $1.str , $1.len), 1); zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $1.str , $1.len), 1);
} }
| str_seq sp dotted_str | QSTR unquoted_dotted_str
{ {
zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $1.str
, $1.len), 1);
zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $2.str
, $2.len), 0);
}
| str_seq QSTR
{
zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $2.str
, $2.len), 0);
}
| str_seq QSTR unquoted_dotted_str
{
zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $2.str
, $2.len), 0);
zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $3.str , $3.len), 0); zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $3.str , $3.len), 0);
} }
| str_seq sp unquoted_dotted_str
{
zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $3.str
, $3.len), 0);
}
| str_seq sp QSTR
{
zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $3.str
, $3.len), 0);
}
| str_seq sp QSTR unquoted_dotted_str
{
zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $3.str
, $3.len), 0);
zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, $4.str
, $4.len), 0);
}
; ;
/* /*
* Generate a single string from multiple STR tokens, separated by * Generate a single string from multiple STR tokens, separated by
* spaces or dots. * spaces or dots.
*/ */
concatenated_str_seq: STR concatenated_str_seq: str
| '.' | '.'
{ {
$$.len = 1; $$.len = 1;
$$.str = region_strdup(parser->rr_region, "."); $$.str = region_strdup(parser->rr_region, ".");
} }
| concatenated_str_seq sp STR | concatenated_str_seq sp str
{ {
$$.len = $1.len + $3.len + 1; $$.len = $1.len + $3.len + 1;
$$.str = (char *) region_alloc(parser->rr_region, $$.len + 1); $$.str = (char *) region_alloc(parser->rr_region, $$.len + 1);
memcpy($$.str, $1.str, $1.len); memcpy($$.str, $1.str, $1.len);
memcpy($$.str + $1.len, " ", 1); memcpy($$.str + $1.len, " ", 1);
memcpy($$.str + $1.len + 1, $3.str, $3.len); memcpy($$.str + $1.len + 1, $3.str, $3.len);
$$.str[$$.len] = '\0'; $$.str[$$.len] = '\0';
} }
| concatenated_str_seq '.' STR | concatenated_str_seq '.' str
{ {
$$.len = $1.len + $3.len + 1; $$.len = $1.len + $3.len + 1;
$$.str = (char *) region_alloc(parser->rr_region, $$.len + 1); $$.str = (char *) region_alloc(parser->rr_region, $$.len + 1);
memcpy($$.str, $1.str, $1.len); memcpy($$.str, $1.str, $1.len);
memcpy($$.str + $1.len, ".", 1); memcpy($$.str + $1.len, ".", 1);
memcpy($$.str + $1.len + 1, $3.str, $3.len); memcpy($$.str + $1.len + 1, $3.str, $3.len);
$$.str[$$.len] = '\0'; $$.str[$$.len] = '\0';
} }
; ;
/* used to convert a nxt list of types */ /* used to convert a nxt list of types */
nxt_seq: STR nxt_seq: str
{ {
uint16_t type = rrtype_from_string($1.str); uint16_t type = rrtype_from_string($1.str);
if (type != 0 && type < 128) { if (type != 0 && type < 128) {
set_bit(nxtbits, type); set_bit(nxtbits, type);
} else { } else {
zc_error("bad type %d in NXT record", (int) type); zc_error("bad type %d in NXT record", (int) type);
} }
} }
| nxt_seq sp STR | nxt_seq sp str
{ {
uint16_t type = rrtype_from_string($3.str); uint16_t type = rrtype_from_string($3.str);
if (type != 0 && type < 128) { if (type != 0 && type < 128) {
set_bit(nxtbits, type); set_bit(nxtbits, type);
} else { } else {
zc_error("bad type %d in NXT record", (int) type); zc_error("bad type %d in NXT record", (int) type);
} }
} }
; ;
nsec_more: SP nsec_more nsec_more: SP nsec_more
{ {
} }
| NL | NL
{ {
} }
| STR nsec_seq | str nsec_seq
{ {
uint16_t type = rrtype_from_string($1.str); uint16_t type = rrtype_from_string($1.str);
if (type != 0) { if (type != 0) {
if (type > nsec_highest_rcode) { if (type > nsec_highest_rcode) {
nsec_highest_rcode = type; nsec_highest_rcode = type;
} }
set_bitnsec(nsecbits, type); set_bitnsec(nsecbits, type);
} else { } else {
zc_error("bad type %d in NSEC record", (int) type); zc_error("bad type %d in NSEC record", (int) type);
} }
skipping to change at line 474 skipping to change at line 504
; ;
nsec_seq: NL nsec_seq: NL
| SP nsec_more | SP nsec_more
; ;
/* /*
* Sequence of STR tokens separated by spaces. The spaces are not * Sequence of STR tokens separated by spaces. The spaces are not
* preserved during concatenation. * preserved during concatenation.
*/ */
str_sp_seq: STR str_sp_seq: str
| str_sp_seq sp STR | str_sp_seq sp str
{ {
char *result = (char *) region_alloc(parser->rr_region, char *result = (char *) region_alloc(parser->rr_region,
$1.len + $3.len + 1); $1.len + $3.len + 1);
memcpy(result, $1.str, $1.len); memcpy(result, $1.str, $1.len);
memcpy(result + $1.len, $3.str, $3.len); memcpy(result + $1.len, $3.str, $3.len);
$$.str = result; $$.str = result;
$$.len = $1.len + $3.len; $$.len = $1.len + $3.len;
$$.str[$$.len] = '\0'; $$.str[$$.len] = '\0';
} }
; ;
/* /*
* Sequence of STR tokens separated by dots. The dots are not * Sequence of STR tokens separated by dots. The dots are not
* preserved during concatenation. * preserved during concatenation.
*/ */
str_dot_seq: STR str_dot_seq: str
| str_dot_seq '.' STR | str_dot_seq '.' str
{ {
char *result = (char *) region_alloc(parser->rr_region, char *result = (char *) region_alloc(parser->rr_region,
$1.len + $3.len + 1); $1.len + $3.len + 1);
memcpy(result, $1.str, $1.len); memcpy(result, $1.str, $1.len);
memcpy(result + $1.len, $3.str, $3.len); memcpy(result + $1.len, $3.str, $3.len);
$$.str = result; $$.str = result;
$$.len = $1.len + $3.len; $$.len = $1.len + $3.len;
$$.str[$$.len] = '\0'; $$.str[$$.len] = '\0';
} }
; ;
/* /*
* A string that can contain dots. * A string that can contain dots.
*/ */
dotted_str: STR unquoted_dotted_str: STR
| '.' | '.'
{ {
$$.str = "."; $$.str = ".";
$$.len = 1; $$.len = 1;
} }
| dotted_str '.' | unquoted_dotted_str '.'
{ {
char *result = (char *) region_alloc(parser->rr_region, char *result = (char *) region_alloc(parser->rr_region,
$1.len + 2); $1.len + 2);
memcpy(result, $1.str, $1.len); memcpy(result, $1.str, $1.len);
result[$1.len] = '.'; result[$1.len] = '.';
$$.str = result; $$.str = result;
$$.len = $1.len + 1; $$.len = $1.len + 1;
$$.str[$$.len] = '\0'; $$.str[$$.len] = '\0';
} }
| dotted_str '.' STR | unquoted_dotted_str '.' STR
{ {
char *result = (char *) region_alloc(parser->rr_region, char *result = (char *) region_alloc(parser->rr_region,
$1.len + $3.len + 2); $1.len + $3.len + 2);
memcpy(result, $1.str, $1.len); memcpy(result, $1.str, $1.len);
result[$1.len] = '.'; result[$1.len] = '.';
memcpy(result + $1.len + 1, $3.str, $3.len); memcpy(result + $1.len + 1, $3.str, $3.len);
$$.str = result; $$.str = result;
$$.len = $1.len + $3.len + 1; $$.len = $1.len + $3.len + 1;
$$.str[$$.len] = '\0'; $$.str[$$.len] = '\0';
} }
; ;
/*
* A string that can contain dots or a quoted string.
*/
dotted_str: unquoted_dotted_str | QSTR
/* define what we can parse */ /* define what we can parse */
type_and_rdata: type_and_rdata:
/* /*
* All supported RR types. We don't support NULL and types marked obsolete. * All supported RR types. We don't support NULL and types marked obsolete.
*/ */
T_A sp rdata_a T_A sp rdata_a
| T_A sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); } | T_A sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); }
| T_NS sp rdata_domain_name | T_NS sp rdata_domain_name
| T_NS sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); } | T_NS sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); }
| T_MD sp rdata_domain_name { zc_warning_prev_line("MD is obsolete"); } | T_MD sp rdata_domain_name { zc_warning_prev_line("MD is obsolete"); }
skipping to change at line 678 skipping to change at line 713
| T_CDNSKEY sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); } | T_CDNSKEY sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); }
| T_OPENPGPKEY sp rdata_openpgpkey | T_OPENPGPKEY sp rdata_openpgpkey
| T_OPENPGPKEY sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); } | T_OPENPGPKEY sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); }
| T_CSYNC sp rdata_csync | T_CSYNC sp rdata_csync
| T_CSYNC sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); } | T_CSYNC sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); }
| T_ZONEMD sp rdata_zonemd | T_ZONEMD sp rdata_zonemd
| T_ZONEMD sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); } | T_ZONEMD sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); }
| T_URI sp rdata_uri | T_URI sp rdata_uri
| T_URI sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); } | T_URI sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); }
| T_UTYPE sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); } | T_UTYPE sp rdata_unknown { $$ = $1; parse_unknown_rdata($1, $3); }
| STR error NL | str error NL
{ {
zc_error_prev_line("unrecognized RR type '%s'", $1.str); zc_error_prev_line("unrecognized RR type '%s'", $1.str);
} }
; ;
/* /*
* *
* below are all the definition for all the different rdata * below are all the definition for all the different rdata
* *
*/ */
skipping to change at line 703 skipping to change at line 738
} }
; ;
rdata_domain_name: dname trail rdata_domain_name: dname trail
{ {
/* convert a single dname record */ /* convert a single dname record */
zadd_rdata_domain($1); zadd_rdata_domain($1);
} }
; ;
rdata_soa: dname sp dname sp STR sp STR sp STR sp STR sp STR trail rdata_soa: dname sp dname sp str sp str sp str sp str sp str trail
{ {
/* convert the soa data */ /* convert the soa data */
zadd_rdata_domain($1); /* prim. ns */ zadd_rdata_domain($1); /* prim. ns */
zadd_rdata_domain($3); /* email */ zadd_rdata_domain($3); /* email */
zadd_rdata_wireformat(zparser_conv_serial(parser->region, $5.str)); / * serial */ zadd_rdata_wireformat(zparser_conv_serial(parser->region, $5.str)); / * serial */
zadd_rdata_wireformat(zparser_conv_period(parser->region, $7.str)); / * refresh */ zadd_rdata_wireformat(zparser_conv_period(parser->region, $7.str)); / * refresh */
zadd_rdata_wireformat(zparser_conv_period(parser->region, $9.str)); / * retry */ zadd_rdata_wireformat(zparser_conv_period(parser->region, $9.str)); / * retry */
zadd_rdata_wireformat(zparser_conv_period(parser->region, $11.str)); /* expire */ zadd_rdata_wireformat(zparser_conv_period(parser->region, $11.str)); /* expire */
zadd_rdata_wireformat(zparser_conv_period(parser->region, $13.str)); /* minimum */ zadd_rdata_wireformat(zparser_conv_period(parser->region, $13.str)); /* minimum */
} }
; ;
rdata_wks: dotted_str sp STR sp concatenated_str_seq trail rdata_wks: dotted_str sp str sp concatenated_str_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_a(parser->region, $1.str)); /* add ress */ zadd_rdata_wireformat(zparser_conv_a(parser->region, $1.str)); /* add ress */
zadd_rdata_wireformat(zparser_conv_services(parser->region, $3.str, $ 5.str)); /* protocol and services */ zadd_rdata_wireformat(zparser_conv_services(parser->region, $3.str, $ 5.str)); /* protocol and services */
} }
; ;
rdata_hinfo: STR sp STR trail rdata_hinfo: str sp str trail
{ {
zadd_rdata_wireformat(zparser_conv_text(parser->region, $1.str, $1.le n)); /* CPU */ zadd_rdata_wireformat(zparser_conv_text(parser->region, $1.str, $1.le n)); /* CPU */
zadd_rdata_wireformat(zparser_conv_text(parser->region, $3.str, $3.le n)); /* OS*/ zadd_rdata_wireformat(zparser_conv_text(parser->region, $3.str, $3.le n)); /* OS*/
} }
; ;
rdata_minfo: dname sp dname trail rdata_minfo: dname sp dname trail
{ {
/* convert a single dname record */ /* convert a single dname record */
zadd_rdata_domain($1); zadd_rdata_domain($1);
zadd_rdata_domain($3); zadd_rdata_domain($3);
} }
; ;
rdata_mx: STR sp dname trail rdata_mx: str sp dname trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); / * priority */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); / * priority */
zadd_rdata_domain($3); /* MX host */ zadd_rdata_domain($3); /* MX host */
} }
; ;
rdata_txt: str_seq trail rdata_txt: str_seq trail
{ {
zadd_rdata_txt_clean_wireformat(); zadd_rdata_txt_clean_wireformat();
} }
skipping to change at line 760 skipping to change at line 795
/* RFC 1183 */ /* RFC 1183 */
rdata_rp: dname sp dname trail rdata_rp: dname sp dname trail
{ {
zadd_rdata_domain($1); /* mbox d-name */ zadd_rdata_domain($1); /* mbox d-name */
zadd_rdata_domain($3); /* txt d-name */ zadd_rdata_domain($3); /* txt d-name */
} }
; ;
/* RFC 1183 */ /* RFC 1183 */
rdata_afsdb: STR sp dname trail rdata_afsdb: str sp dname trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* subtype */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* subtype */
zadd_rdata_domain($3); /* domain name */ zadd_rdata_domain($3); /* domain name */
} }
; ;
/* RFC 1183 */ /* RFC 1183 */
rdata_x25: STR trail rdata_x25: str trail
{ {
zadd_rdata_wireformat(zparser_conv_text(parser->region, $1.str, $1.le n)); /* X.25 address. */ zadd_rdata_wireformat(zparser_conv_text(parser->region, $1.str, $1.le n)); /* X.25 address. */
} }
; ;
/* RFC 1183 */ /* RFC 1183 */
rdata_isdn: STR trail rdata_isdn: str trail
{ {
zadd_rdata_wireformat(zparser_conv_text(parser->region, $1.str, $1.le n)); /* address */ zadd_rdata_wireformat(zparser_conv_text(parser->region, $1.str, $1.le n)); /* address */
} }
| STR sp STR trail | str sp str trail
{ {
zadd_rdata_wireformat(zparser_conv_text(parser->region, $1.str, $1.le n)); /* address */ zadd_rdata_wireformat(zparser_conv_text(parser->region, $1.str, $1.le n)); /* address */
zadd_rdata_wireformat(zparser_conv_text(parser->region, $3.str, $3.le n)); /* sub-address */ zadd_rdata_wireformat(zparser_conv_text(parser->region, $3.str, $3.le n)); /* sub-address */
} }
; ;
/* RFC 1183 */ /* RFC 1183 */
rdata_rt: STR sp dname trail rdata_rt: str sp dname trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* preference */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* preference */
zadd_rdata_domain($3); /* intermediate host */ zadd_rdata_domain($3); /* intermediate host */
} }
; ;
/* RFC 1706 */ /* RFC 1706 */
rdata_nsap: str_dot_seq trail rdata_nsap: str_dot_seq trail
{ {
/* String must start with "0x" or "0X". */ /* String must start with "0x" or "0X". */
if (strncasecmp($1.str, "0x", 2) != 0) { if (strncasecmp($1.str, "0x", 2) != 0) {
zc_error_prev_line("NSAP rdata must start with '0x'"); zc_error_prev_line("NSAP rdata must start with '0x'");
} else { } else {
zadd_rdata_wireformat(zparser_conv_hex(parser->region, $1.str + 2, $1.len - 2)); /* NSAP */ zadd_rdata_wireformat(zparser_conv_hex(parser->region, $1.str + 2, $1.len - 2)); /* NSAP */
} }
} }
; ;
/* RFC 2163 */ /* RFC 2163 */
rdata_px: STR sp dname sp dname trail rdata_px: str sp dname sp dname trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* preference */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* preference */
zadd_rdata_domain($3); /* MAP822 */ zadd_rdata_domain($3); /* MAP822 */
zadd_rdata_domain($5); /* MAPX400 */ zadd_rdata_domain($5); /* MAPX400 */
} }
; ;
rdata_aaaa: dotted_str trail rdata_aaaa: dotted_str trail
{ {
zadd_rdata_wireformat(zparser_conv_aaaa(parser->region, $1.str)); /* IPv6 address */ zadd_rdata_wireformat(zparser_conv_aaaa(parser->region, $1.str)); /* IPv6 address */
skipping to change at line 835 skipping to change at line 870
; ;
rdata_nxt: dname sp nxt_seq trail rdata_nxt: dname sp nxt_seq trail
{ {
zadd_rdata_domain($1); /* nxt name */ zadd_rdata_domain($1); /* nxt name */
zadd_rdata_wireformat(zparser_conv_nxt(parser->region, nxtbits)); /* nxt bitlist */ zadd_rdata_wireformat(zparser_conv_nxt(parser->region, nxtbits)); /* nxt bitlist */
memset(nxtbits, 0, sizeof(nxtbits)); memset(nxtbits, 0, sizeof(nxtbits));
} }
; ;
rdata_srv: STR sp STR sp STR sp dname trail rdata_srv: str sp str sp str sp dname trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* prio */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* prio */
zadd_rdata_wireformat(zparser_conv_short(parser->region, $3.str)); /* weight */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $3.str)); /* weight */
zadd_rdata_wireformat(zparser_conv_short(parser->region, $5.str)); /* port */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $5.str)); /* port */
zadd_rdata_domain($7); /* target name */ zadd_rdata_domain($7); /* target name */
} }
; ;
/* RFC 2915 */ /* RFC 2915 */
rdata_naptr: STR sp STR sp STR sp STR sp STR sp dname trail rdata_naptr: str sp str sp str sp str sp str sp dname trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* order */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* order */
zadd_rdata_wireformat(zparser_conv_short(parser->region, $3.str)); /* preference */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $3.str)); /* preference */
zadd_rdata_wireformat(zparser_conv_text(parser->region, $5.str, $5.le n)); /* flags */ zadd_rdata_wireformat(zparser_conv_text(parser->region, $5.str, $5.le n)); /* flags */
zadd_rdata_wireformat(zparser_conv_text(parser->region, $7.str, $7.le n)); /* service */ zadd_rdata_wireformat(zparser_conv_text(parser->region, $7.str, $7.le n)); /* service */
zadd_rdata_wireformat(zparser_conv_text(parser->region, $9.str, $9.le n)); /* regexp */ zadd_rdata_wireformat(zparser_conv_text(parser->region, $9.str, $9.le n)); /* regexp */
zadd_rdata_domain($11); /* target name */ zadd_rdata_domain($11); /* target name */
} }
; ;
/* RFC 2230 */ /* RFC 2230 */
rdata_kx: STR sp dname trail rdata_kx: str sp dname trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* preference */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* preference */
zadd_rdata_domain($3); /* exchanger */ zadd_rdata_domain($3); /* exchanger */
} }
; ;
/* RFC 2538 */ /* RFC 2538 */
rdata_cert: STR sp STR sp STR sp str_sp_seq trail rdata_cert: str sp str sp str sp str_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_certificate_type(parser->region, $ 1.str)); /* type */ zadd_rdata_wireformat(zparser_conv_certificate_type(parser->region, $ 1.str)); /* type */
zadd_rdata_wireformat(zparser_conv_short(parser->region, $3.str)); /* key tag */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $3.str)); /* key tag */
zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, $5.str)) ; /* algorithm */ zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, $5.str)) ; /* algorithm */
zadd_rdata_wireformat(zparser_conv_b64(parser->region, $7.str)); /* c ertificate or CRL */ zadd_rdata_wireformat(zparser_conv_b64(parser->region, $7.str)); /* c ertificate or CRL */
} }
; ;
/* RFC 3123 */ /* RFC 3123 */
rdata_apl: rdata_apl_seq trail rdata_apl: rdata_apl_seq trail
skipping to change at line 888 skipping to change at line 923
rdata_apl_seq: dotted_str rdata_apl_seq: dotted_str
{ {
zadd_rdata_wireformat(zparser_conv_apl_rdata(parser->region, $1.str)) ; zadd_rdata_wireformat(zparser_conv_apl_rdata(parser->region, $1.str)) ;
} }
| rdata_apl_seq sp dotted_str | rdata_apl_seq sp dotted_str
{ {
zadd_rdata_wireformat(zparser_conv_apl_rdata(parser->region, $3.str)) ; zadd_rdata_wireformat(zparser_conv_apl_rdata(parser->region, $3.str)) ;
} }
; ;
rdata_ds: STR sp STR sp STR sp str_sp_seq trail rdata_ds: str sp str sp str sp str_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* keytag */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* keytag */
zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, $3.str)) ; /* alg */ zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, $3.str)) ; /* alg */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* type */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* type */
zadd_rdata_wireformat(zparser_conv_hex(parser->region, $7.str, $7.len )); /* hash */ zadd_rdata_wireformat(zparser_conv_hex(parser->region, $7.str, $7.len )); /* hash */
} }
; ;
rdata_dlv: STR sp STR sp STR sp str_sp_seq trail rdata_dlv: str sp str sp str sp str_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* keytag */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* keytag */
zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, $3.str)) ; /* alg */ zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, $3.str)) ; /* alg */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* type */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* type */
zadd_rdata_wireformat(zparser_conv_hex(parser->region, $7.str, $7.len )); /* hash */ zadd_rdata_wireformat(zparser_conv_hex(parser->region, $7.str, $7.len )); /* hash */
} }
; ;
rdata_sshfp: STR sp STR sp str_sp_seq trail rdata_sshfp: str sp str sp str_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $1.str)); /* alg */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $1.str)); /* alg */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* fp type */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* fp type */
zadd_rdata_wireformat(zparser_conv_hex(parser->region, $5.str, $5.len )); /* hash */ zadd_rdata_wireformat(zparser_conv_hex(parser->region, $5.str, $5.len )); /* hash */
check_sshfp(); check_sshfp();
} }
; ;
rdata_dhcid: str_sp_seq trail rdata_dhcid: str_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_b64(parser->region, $1.str)); /* d ata blob */ zadd_rdata_wireformat(zparser_conv_b64(parser->region, $1.str)); /* d ata blob */
} }
; ;
rdata_rrsig: STR sp STR sp STR sp STR sp STR sp STR sp STR sp wire_dname sp st r_sp_seq trail rdata_rrsig: str sp str sp str sp str sp str sp str sp str sp wire_dname sp st r_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_rrtype(parser->region, $1.str)); / * rr covered */ zadd_rdata_wireformat(zparser_conv_rrtype(parser->region, $1.str)); / * rr covered */
zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, $3.str)) ; /* alg */ zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, $3.str)) ; /* alg */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* # labels */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* # labels */
zadd_rdata_wireformat(zparser_conv_period(parser->region, $7.str)); / * # orig TTL */ zadd_rdata_wireformat(zparser_conv_period(parser->region, $7.str)); / * # orig TTL */
zadd_rdata_wireformat(zparser_conv_time(parser->region, $9.str)); /* sig exp */ zadd_rdata_wireformat(zparser_conv_time(parser->region, $9.str)); /* sig exp */
zadd_rdata_wireformat(zparser_conv_time(parser->region, $11.str)); /* sig inc */ zadd_rdata_wireformat(zparser_conv_time(parser->region, $11.str)); /* sig inc */
zadd_rdata_wireformat(zparser_conv_short(parser->region, $13.str)); / * key id */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $13.str)); / * key id */
zadd_rdata_wireformat(zparser_conv_dns_name(parser->region, zadd_rdata_wireformat(zparser_conv_dns_name(parser->region,
(const uint8_t*) $15.str,$15.len)); /* sig name * / (const uint8_t*) $15.str,$15.len)); /* sig name * /
skipping to change at line 946 skipping to change at line 981
rdata_nsec: wire_dname nsec_seq rdata_nsec: wire_dname nsec_seq
{ {
zadd_rdata_wireformat(zparser_conv_dns_name(parser->region, zadd_rdata_wireformat(zparser_conv_dns_name(parser->region,
(const uint8_t*) $1.str, $1.len)); /* nsec name * / (const uint8_t*) $1.str, $1.len)); /* nsec name * /
zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); / * nsec bitlist */ zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); / * nsec bitlist */
memset(nsecbits, 0, sizeof(nsecbits)); memset(nsecbits, 0, sizeof(nsecbits));
nsec_highest_rcode = 0; nsec_highest_rcode = 0;
} }
; ;
rdata_nsec3: STR sp STR sp STR sp STR sp STR nsec_seq rdata_nsec3: str sp str sp str sp str sp str nsec_seq
{ {
#ifdef NSEC3 #ifdef NSEC3
nsec3_add_params($1.str, $3.str, $5.str, $7.str, $7.len); nsec3_add_params($1.str, $3.str, $5.str, $7.str, $7.len);
zadd_rdata_wireformat(zparser_conv_b32(parser->region, $9.str)); /* n ext hashed name */ zadd_rdata_wireformat(zparser_conv_b32(parser->region, $9.str)); /* n ext hashed name */
zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); / * nsec bitlist */ zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); / * nsec bitlist */
memset(nsecbits, 0, sizeof(nsecbits)); memset(nsecbits, 0, sizeof(nsecbits));
nsec_highest_rcode = 0; nsec_highest_rcode = 0;
#else #else
zc_error_prev_line("nsec3 not supported"); zc_error_prev_line("nsec3 not supported");
#endif /* NSEC3 */ #endif /* NSEC3 */
} }
; ;
rdata_nsec3_param: STR sp STR sp STR sp STR trail rdata_nsec3_param: str sp str sp str sp str trail
{ {
#ifdef NSEC3 #ifdef NSEC3
nsec3_add_params($1.str, $3.str, $5.str, $7.str, $7.len); nsec3_add_params($1.str, $3.str, $5.str, $7.str, $7.len);
#else #else
zc_error_prev_line("nsec3 not supported"); zc_error_prev_line("nsec3 not supported");
#endif /* NSEC3 */ #endif /* NSEC3 */
} }
; ;
rdata_tlsa: STR sp STR sp STR sp str_sp_seq trail rdata_tlsa: str sp str sp str sp str_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $1.str)); /* usage */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $1.str)); /* usage */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* selector */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* selector */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* matching type */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* matching type */
zadd_rdata_wireformat(zparser_conv_hex(parser->region, $7.str, $7.len )); /* ca data */ zadd_rdata_wireformat(zparser_conv_hex(parser->region, $7.str, $7.len )); /* ca data */
} }
; ;
rdata_smimea: STR sp STR sp STR sp str_sp_seq trail rdata_smimea: str sp str sp str sp str_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $1.str)); /* usage */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $1.str)); /* usage */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* selector */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* selector */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* matching type */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* matching type */
zadd_rdata_wireformat(zparser_conv_hex(parser->region, $7.str, $7.len )); /* ca data */ zadd_rdata_wireformat(zparser_conv_hex(parser->region, $7.str, $7.len )); /* ca data */
} }
; ;
rdata_dnskey: STR sp STR sp STR sp str_sp_seq trail rdata_dnskey: str sp str sp str sp str_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* flags */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* flags */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* proto */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* proto */
zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, $5.str)) ; /* alg */ zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, $5.str)) ; /* alg */
zadd_rdata_wireformat(zparser_conv_b64(parser->region, $7.str)); /* h ash */ zadd_rdata_wireformat(zparser_conv_b64(parser->region, $7.str)); /* h ash */
} }
; ;
rdata_ipsec_base: STR sp STR sp STR sp dotted_str rdata_ipsec_base: str sp str sp str sp dotted_str
{ {
const dname_type* name = 0; const dname_type* name = 0;
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $1.str)); /* precedence */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $1.str)); /* precedence */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* gateway type */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* gateway type */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* algorithm */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* algorithm */
switch(atoi($3.str)) { switch(atoi($3.str)) {
case IPSECKEY_NOGATEWAY: case IPSECKEY_NOGATEWAY:
zadd_rdata_wireformat(alloc_rdata_init(parser->region, "" , 0)); zadd_rdata_wireformat(alloc_rdata_init(parser->region, "" , 0));
break; break;
case IPSECKEY_IP4: case IPSECKEY_IP4:
skipping to change at line 1051 skipping to change at line 1086
; ;
rdata_ipseckey: rdata_ipsec_base sp str_sp_seq trail rdata_ipseckey: rdata_ipsec_base sp str_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_b64(parser->region, $3.str)); /* pu blic key */ zadd_rdata_wireformat(zparser_conv_b64(parser->region, $3.str)); /* pu blic key */
} }
| rdata_ipsec_base trail | rdata_ipsec_base trail
; ;
/* RFC 6742 */ /* RFC 6742 */
rdata_nid: STR sp dotted_str trail rdata_nid: str sp dotted_str trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); / * preference */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); / * preference */
zadd_rdata_wireformat(zparser_conv_ilnp64(parser->region, $3.str)); /* NodeID */ zadd_rdata_wireformat(zparser_conv_ilnp64(parser->region, $3.str)); /* NodeID */
} }
; ;
rdata_l32: STR sp dotted_str trail rdata_l32: str sp dotted_str trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); / * preference */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); / * preference */
zadd_rdata_wireformat(zparser_conv_a(parser->region, $3.str)); /* Lo cator32 */ zadd_rdata_wireformat(zparser_conv_a(parser->region, $3.str)); /* Lo cator32 */
} }
; ;
rdata_l64: STR sp dotted_str trail rdata_l64: str sp dotted_str trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); / * preference */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); / * preference */
zadd_rdata_wireformat(zparser_conv_ilnp64(parser->region, $3.str)); /* Locator64 */ zadd_rdata_wireformat(zparser_conv_ilnp64(parser->region, $3.str)); /* Locator64 */
} }
; ;
rdata_lp: STR sp dname trail rdata_lp: str sp dname trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); / * preference */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); / * preference */
zadd_rdata_domain($3); /* FQDN */ zadd_rdata_domain($3); /* FQDN */
} }
; ;
rdata_eui48: STR trail rdata_eui48: str trail
{ {
zadd_rdata_wireformat(zparser_conv_eui(parser->region, $1.str, 48)); zadd_rdata_wireformat(zparser_conv_eui(parser->region, $1.str, 48));
} }
; ;
rdata_eui64: STR trail rdata_eui64: str trail
{ {
zadd_rdata_wireformat(zparser_conv_eui(parser->region, $1.str, 64)); zadd_rdata_wireformat(zparser_conv_eui(parser->region, $1.str, 64));
} }
; ;
/* RFC7553 */ /* RFC7553 */
rdata_uri: STR sp STR sp dotted_str trail rdata_uri: str sp str sp dotted_str trail
{ {
zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* priority */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $1.str)); /* priority */
zadd_rdata_wireformat(zparser_conv_short(parser->region, $3.str)); /* weight */ zadd_rdata_wireformat(zparser_conv_short(parser->region, $3.str)); /* weight */
zadd_rdata_wireformat(zparser_conv_long_text(parser->region, $5.str, $5.len)); /* target */ zadd_rdata_wireformat(zparser_conv_long_text(parser->region, $5.str, $5.len)); /* target */
} }
; ;
/* RFC 6844 */ /* RFC 6844 */
rdata_caa: STR sp STR sp dotted_str trail rdata_caa: str sp str sp dotted_str trail
{ {
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $1.str)); /* Flags */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $1.str)); /* Flags */
zadd_rdata_wireformat(zparser_conv_tag(parser->region, $3.str, $3.len )); /* Tag */ zadd_rdata_wireformat(zparser_conv_tag(parser->region, $3.str, $3.len )); /* Tag */
zadd_rdata_wireformat(zparser_conv_long_text(parser->region, $5.str, $5.len)); /* Value */ zadd_rdata_wireformat(zparser_conv_long_text(parser->region, $5.str, $5.len)); /* Value */
} }
; ;
/* RFC7929 */ /* RFC7929 */
rdata_openpgpkey: str_sp_seq trail rdata_openpgpkey: str_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_b64(parser->region, $1.str)); zadd_rdata_wireformat(zparser_conv_b64(parser->region, $1.str));
} }
; ;
/* RFC7477 */ /* RFC7477 */
rdata_csync: STR sp STR nsec_seq rdata_csync: str sp str nsec_seq
{ {
zadd_rdata_wireformat(zparser_conv_serial(parser->region, $1.str)); zadd_rdata_wireformat(zparser_conv_serial(parser->region, $1.str));
zadd_rdata_wireformat(zparser_conv_short(parser->region, $3.str)); zadd_rdata_wireformat(zparser_conv_short(parser->region, $3.str));
zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); / * nsec bitlist */ zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); / * nsec bitlist */
memset(nsecbits, 0, sizeof(nsecbits)); memset(nsecbits, 0, sizeof(nsecbits));
nsec_highest_rcode = 0; nsec_highest_rcode = 0;
} }
; ;
/* draft-ietf-dnsop-dns-zone-digest */ /* draft-ietf-dnsop-dns-zone-digest */
rdata_zonemd: STR sp STR sp STR sp str_sp_seq trail rdata_zonemd: str sp str sp str sp str_sp_seq trail
{ {
zadd_rdata_wireformat(zparser_conv_serial(parser->region, $1.str)); / * serial */ zadd_rdata_wireformat(zparser_conv_serial(parser->region, $1.str)); / * serial */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* scheme */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $3.str)); /* scheme */
zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* hash algorithm */ zadd_rdata_wireformat(zparser_conv_byte(parser->region, $5.str)); /* hash algorithm */
zadd_rdata_wireformat(zparser_conv_hex(parser->region, $7.str, $7.len )); /* digest */ zadd_rdata_wireformat(zparser_conv_hex(parser->region, $7.str, $7.len )); /* digest */
} }
; ;
rdata_unknown: URR sp STR sp str_sp_seq trail rdata_unknown: URR sp str sp str_sp_seq trail
{ {
/* $2 is the number of octets, currently ignored */ /* $2 is the number of octets, currently ignored */
$$ = zparser_conv_hex(parser->rr_region, $5.str, $5.len); $$ = zparser_conv_hex(parser->rr_region, $5.str, $5.len);
} }
| URR sp STR trail | URR sp str trail
{ {
$$ = zparser_conv_hex(parser->rr_region, "", 0); $$ = zparser_conv_hex(parser->rr_region, "", 0);
} }
| URR error NL | URR error NL
{ {
$$ = zparser_conv_hex(parser->rr_region, "", 0); $$ = zparser_conv_hex(parser->rr_region, "", 0);
} }
; ;
%% %%
 End of changes. 59 change blocks. 
57 lines changed or deleted 101 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)