BIND 10 #3245: wrong unit for wait of DNSClient::doUpdate()
BIND 10 Development
do-not-reply at isc.org
Sat Nov 16 19:51:00 UTC 2013
#3245: wrong unit for wait of DNSClient::doUpdate()
-------------------------------------+-------------------------------------
Reporter: | Owner:
jinmei | Status: new
Type: | Milestone: New Tasks
defect | Keywords:
Priority: | Sensitive: 0
medium | Sub-Project: DHCP
Component: dhcp- | Estimated Difficulty: 0
ddns | Total Hours: 0
CVSS Scoring: |
Defect Severity: N/A |
Feature Depending on Ticket: |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
While the description says it's in seconds:
{{{#!cpp
/// @param wait A timeout (in seconds) for the response. If a response
is
/// not received within the timeout, exchange is interrupted. This
value
/// must not exceed maximal value for 'int' data type.
}}}
it passes the value to the `IOFetch` constructor without any conversion:
{{{#!cpp
IOFetch io_fetch(IOFetch::UDP, io_service, msg_buf, ns_addr, ns_port,
in_buf_, this, static_cast<int>(wait));
}}}
where it's interpreted as milliseconds:
{{{#!cpp
/// \param wait Timeout for the fetch (in ms). The default value of
/// -1 indicates no timeout.
IOFetch(Protocol protocol, isc::asiolink::IOService& service,
isc::util::OutputBufferPtr& outpkt,
const isc::asiolink::IOAddress& address,
uint16_t port, isc::util::OutputBufferPtr& buff, Callback* cb,
int wait = -1);
}}}
Fixing it should be trivial, but you might also want to revisit how this
error was introduced; it probably suggests either or both of the
review process and testing were not sufficient.
--
Ticket URL: <http://bind10.isc.org/ticket/3245>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list