BIND 10 #167: configure addresses and ports to listen on for DNS servers

BIND 10 Development do-not-reply at isc.org
Tue May 25 23:30:17 UTC 2010


#167: configure addresses and ports to listen on for DNS servers
--------------------------+-------------------------------------------------
 Reporter:  larissas      |        Owner:  each                       
     Type:  task          |       Status:  reviewing                  
 Priority:  major         |    Milestone:  04. 2nd Incremental Release
Component:  Unclassified  |   Resolution:                             
 Keywords:                |    Sensitive:  0                          
--------------------------+-------------------------------------------------

Comment(by each):

 > Decent level programmers can probably figure out what this code does,
 but that wouldn't be immediately obvious. And, due to the nested
 conditions it's not so easy to be confident that this code does what it's
 supposed to do from a glance.

 If nesting is the problem, there are other ways to structure it.  Could
 have a series of try...except statements with "pass" in each of the
 excepts, for instance.  Or this:

 {{{
   for family in (socket.AF_INET, socket.AF_INET6):
     try:
       a = socket.inet_pton(family, addr)
       self.family = family
       self.addr = a
       return
     except socket.error:
       continue
     except Exception as e:
       raise e

     raise socket.error('Invalid IP address')
 }}}

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


More information about the bind10-tickets mailing list