BIND 10 #1387: timeout on xfrout when sock path too long

BIND 10 Development do-not-reply at isc.org
Wed Dec 7 12:29:46 UTC 2011


#1387: timeout on xfrout when sock path too long
-------------------------------------+-------------------------------------
                   Reporter:  jelte  |                 Owner:  jinmei
                       Type:         |                Status:  reviewing
  defect                             |             Milestone:
                   Priority:  major  |  Sprint-20111220
                  Component:         |            Resolution:
  Unclassified                       |             Sensitive:  0
                   Keywords:         |           Sub-Project:  DNS
            Defect Severity:  N/A    |  Estimated Difficulty:  5
Feature Depending on Ticket:  none   |           Total Hours:  1
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by jelte):

 * owner:  jelte => jinmei
 * totalhours:  0 => 1


Comment:

 Just to be clear, the asio connect() call, when given the optional error
 variable, can still raise exceptions? If so, I wonder if this is also the
 case for some of the other calls then.

 And yes, we do need more tests :) (but not in this ticket)

 Anyway, on to the code;

 xfrout_client.cc:

 in XfroutClient::connect(), asio::error_code err is now unused and can be
 removed (wonder why neither my compiler nor cppcheck fails on that)

 client_test.cc:

 My compiler does not allow the uninitialized sockaddr_un structure as a
 const...

 I noticed my system headers have a macro for this specific thing:
 {{{
 # define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path)
 \
                       + strlen ((ptr)->sun_path))
 }}}

 Though I don't know how portable the macro is.

 BTW, the variable name should also not be sun, as that is a predefined
 macro in sunstudio system headers

-- 
Ticket URL: <http://bind10.isc.org/ticket/1387#comment:9>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list