Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#697 closed defect (fixed)

b10-resolver crashed on parsing answer (server failed: additional too short)

Reported by: jelte Owned by: jelte
Priority: high Milestone: R-Team-Sprint-20110316
Component: resolver Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: 2.0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

Error message:

[b10-resolver] Server failed: ADDITIONAL section too short: 2 bytes

(unsure where said answer came from, but we definitely need some strategic catching of exceptions here, this is no reason to stop working)

(this is from master 2754c99e705b7d45551aafe014fc2c11e6e4e6e3)

Subtickets

Change History (8)

comment:1 Changed 9 years ago by jelte

  • Owner set to jelte
  • Status changed from new to assigned

comment:2 Changed 9 years ago by jelte

  • Owner changed from jelte to UnAssigned
  • Status changed from assigned to reviewing

Resulting from the discussion on jabber, for now we'll treat this similar to a timeout (i.e. if there are retries left, just send another query to any server, if not respond with SERVFAIL).

comment:3 Changed 9 years ago by stephen

  • Milestone set to R-Team-Sprint-20110316
  • Owner changed from UnAssigned to stephen

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

  • Owner changed from stephen to jelte

src/lib/resolve/tests/recursive_query_unittest_2.cc
The QueryStatus enum should have explicit values assigned to each member according to the CodingGuidelines.

udpReceiveHandler(): In the "case UDP_EXAMPLE_ORG_BAD" clause, I would suggest setting the next expected state (the value of "expected_") at that point instead of deferring it to when packet is mangled to keep symmetry with the other "case" clauses. Also, the comment in this clause should indicate that the packet will be mangled after it is created to force a repeat query over UDP.

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

  • Owner changed from jelte to stephen

Replying to stephen:

src/lib/resolve/tests/recursive_query_unittest_2.cc
The QueryStatus enum should have explicit values assigned to each member according to the CodingGuidelines.

what a weird requirement. Re-added them.

udpReceiveHandler(): In the "case UDP_EXAMPLE_ORG_BAD" clause, I would suggest setting the next expected state (the value of "expected_") at that point instead of deferring it to when packet is mangled to keep symmetry with the other "case" clauses. Also, the comment in this clause should indicate that the packet will be mangled after it is created to force a repeat query over UDP.

I deferred it to prevent the necessity of another temp var, but adding one actually makes more sense (also considering the rest of your comment), so i've added a bool mangle_response.

Changes in c34be1b6a604ffb0a6ef34abfcf9c2fa42451d8c

comment:6 Changed 9 years ago by stephen

  • Owner changed from stephen to jelte

All OK, please merge.

comment:7 Changed 9 years ago by jelte

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

comment:8 Changed 9 years ago by jelte

  • Estimated Difficulty changed from 0.0 to 2
Note: See TracTickets for help on using tickets.