BIND 10 #2497: introduce wrapper version of "from lexer" rdata factory
BIND 10 Development
do-not-reply at isc.org
Mon Dec 3 23:29:19 UTC 2012
#2497: introduce wrapper version of "from lexer" rdata factory
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner: muks
Type: task | Status:
Priority: medium | reviewing
Component: libdns++ | Milestone:
Keywords: | Sprint-20121204
Sensitive: 0 | Resolution:
Sub-Project: DNS | CVSS Scoring:
Estimated Difficulty: 0 | Defect Severity: N/A
Total Hours: 0 | Feature Depending on Ticket:
| loadzone-ng
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Comment (by muks):
Replying to [comment:22 jinmei]:
> Replying to [comment:20 muks]:
>
> > > {{{#!python
> > > new_rdatafactory_users = []
> > > }}}
> > > No one except the original author can figure out what should be
> > > added to the list when a new type is supported unless they bother
to
> > > read the code to understand how this list is used.
> >
> > * Comments were added
> > * The list takes tuples of (rrtype, rrclass) now.
>
> I'm afraid this doesn't cover the pairs of generic types for class
> "IN" like this:
> {{{#!cpp
> add("SOA", 6, "IN", 1, RdataFactoryPtr(new
OldRdataFactory<generic::SOA>()));
> }}}
>
> It's probably due to poor/no documentation of the script, but we have
> this trick as a heuristics optimization for class "IN":
> {{{#!python
> if class_txt == 'generic':
> typeandclass.append((type_txt,
int(type_code),
> (class_txt, 'in'), 1))
> }}}
>
> So, for example, if we have ('xxx', 'generic') in
new_rdata_factory_users,
> we need to handle the case of ('xxx', 'in'), too. One easy way to
> just clarify it in the comment (after all this is temporary
> workaround). Another is to handle it automatically in
generate_rrparam().
I've updated the code to handle this, and also verified it with a
`[('soa', 'generic')]` sample list, which also applies it to the `('soa',
'in')` case.
--
Ticket URL: <http://bind10.isc.org/ticket/2497#comment:24>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list