Opened 9 years ago

Closed 9 years ago

#411 closed defect (fixed)

isc.datasrc.master's isttl() regex is broken

Reported by: jreed Owned by: jinmei
Priority: medium Milestone: y2 12 month milestone
Component: data source Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: 0.0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

(Problem reported on bind10-dev.)

isttl in isc.datasrc.master matches 4ever.de label as a TTL.

The parsing should use the new python wrapper around the dns library.

Subtickets

Change History (7)

comment:1 in reply to: ↑ description Changed 9 years ago by jinmei

  • Milestone set to y2 12 month milestone
  • Owner set to UnAssigned
  • Status changed from new to reviewing

Replying to jreed:

(Problem reported on bind10-dev.)

isttl in isc.datasrc.master matches 4ever.de label as a TTL.

I believe I've fixed it in branches/trac411. It's ready for review.

I also noticed b10-loadzone and the python datasrc module don't have python unit tests (loadzone has some manual test data, but relying on such things is a bad practice). This is BAD.

As an initial step toward the right direction, I've created a tests directory and added some simple tests for this particular problem.

The proposed changelog entry is as follows:

  117.	[bug]		jinmei
	The master file parser of the python datasrc module incorrectly
	regarded a domain name beginning with a decimal number as a TTL
	specification.  This confused b10-loadzone and had it reject to
	load a zone file that contains such a name. (Trac #410, svn rTBD)

The parsing should use the new python wrapper around the dns library.

Yes, but libdns++ doesn't yet support fancy TTL spec such as "1D".

comment:2 follow-up: Changed 9 years ago by jinmei

Corrected the ticket number:

  117.	[bug]		jinmei
	The master file parser of the python datasrc module incorrectly
	regarded a domain name beginning with a decimal number as a TTL
	specification.  This confused b10-loadzone and had it reject to
	load a zone file that contains such a name. (Trac #411, svn rTBD)

comment:3 in reply to: ↑ 2 Changed 9 years ago by jinmei

Heads up: could someone take a look at it? This should be pretty trivial and was confirmed to solve the reported problem.

comment:4 follow-up: Changed 9 years ago by vorner

  • Owner changed from UnAssigned to jinmei

Hello

Seems OK, I think it can be merged.

However, is it a complete fix? What if someone has a domain containing 1d as the name?

comment:5 in reply to: ↑ 4 Changed 9 years ago by jinmei

  • Owner changed from jinmei to vorner

Replying to vorner:

Hello

Seems OK, I think it can be merged.

However, is it a complete fix? What if someone has a domain containing 1d as the name?

It's not a complete fix. The patched code would still be confused with a line beginning with "1d", "1H", "3600", etc. For a complete fix we need to address the more general issue reported in #413.

We should probably note that in ChangeLog?:

119.?	[bug]		jinmei
	The master file parser of the python datasrc module incorrectly
	regarded a domain name beginning with a decimal number as a TTL
	specification.  This confused b10-loadzone and had it reject to
	load a zone file that contains such a name.
	Note: this fix is incomplete and the loadzone would still be
	confused if the owner name is a syntactically indistinguishable
	from a TTL specification.  This is part of a more general issue
	and will be addressed in Trac #413.  (Trac #411, svn rTBD)

comment:6 follow-up: Changed 9 years ago by vorner

  • Owner changed from vorner to jinmei

Ok, I agree with the change and with merge.

comment:7 in reply to: ↑ 6 Changed 9 years ago by jinmei

  • Resolution set to fixed
  • Status changed from reviewing to closed

Replying to vorner:

Ok, I agree with the change and with merge.

Thanks, committed, closing.

Note: See TracTickets for help on using tickets.