BIND 10 #805: Client side code to request new sockets (C++)

BIND 10 Development do-not-reply at isc.org
Fri Dec 23 15:13:08 UTC 2011


#805: Client side code to request new sockets (C++)
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  UnAssigned
  stephen                            |                Status:  reviewing
                       Type:         |             Milestone:
  enhancement                        |  Sprint-20120110
                   Priority:         |            Resolution:
  blocker                            |             Sensitive:  0
                  Component:         |           Sub-Project:  DNS
  Unclassified                       |  Estimated Difficulty:  5
                   Keywords:         |           Total Hours:  0
            Defect Severity:  N/A    |
Feature Depending on Ticket:         |
  Socket creator                     |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by vorner):

 * owner:  vorner => UnAssigned
 * status:  accepted => reviewing


Comment:

 Hello

 Replying to [comment:7 jinmei]:
 > While looking at #1522 I've noticed some portability and other issues
 > on the base #805 implementation.  You may want to take a look at that
 > part of the comment:
 > http://bind10.isc.org/ticket/1522#comment:5

 Thanks for them, I'll have a look at them.

 > I'd also suggest building and running the code on other flavor of OSes
 > (some kind of BSD and ideally also Solaris) before merging the branch.

 I don't have them at hand :-(. I'll ask Jeremy to put it to the build bots
 sometime before merge.

 Anyway, despite the fact I didn't yet have a look at the code based on the
 comments, I'd put it to review, so I can fix it and have it being reviewed
 in parallel.

 This branch does these things:
  * Allows the DNS service to add a listening sockets based on FD as well
 as address and port pair.
  * Makes the portconfig library use the socket creator instead of creating
 the sockets itself. It does not use any kind of sharing for now and
 hardcodes the share name, but this has the minimal impact of the rest of
 the code and makes auth and resolver use the socket creator right away
 (the only change in them is including the initialization of the socket
 requestor).
  * Defines the interface of the socket requestor, but the real
 implementation is in #1522. I want to merge that one to this branch first
 and try it out if the whole socket creator thing works (there's a lot of
 stuff that is tested only by unit tests and it is very untried concept ‒ I
 expect it'll break somewhere).
  * Creates a test socket requestor, so it can be used in other tests
 (portconfig tests, auth tests, resolver tests).

 The portconfig library isn't tested completely ‒ the tests disable putting
 the sockets to ASIO, as the ASIO would like to close the passed file
 descriptors. However, the test socket requestor makes the file descriptors
 up, which becomes quite messy then, if they are closed.

 Anyway, the branch can be reviewed on three parts, if reviewing at once is
 too much, eg:
  *
 f9cbe6fb6e0a3d3dc03218429f530e6c01920169..5345a3c2ba2daf9329b33984782ad50f72734837
 (changes to put FDs to the DNS service)
  * c8caecc35195080d091611bb0809cbc2834ba3f4 (interface for the socket
 requestor)
  * The rest ‒ portconfig library and tests

 I'd propose this changelog entry (probably together with #1522):
 {{{
 [func]          vorner,jelte
 The authoritative server and resolver request their listening sockets
 from the socket creator. The change should be transparent to user, but
 it should be possible to restart them or configure privileged ports
 even later, when they run as non-root.
 }}}

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


More information about the bind10-tickets mailing list