Report information
The Basics
Id:
46508
Status:
open
Priority:
Low/Low
Queue:

People
BugTracker
Version Fixed:
9.9.12, 9.9.12(sub), 9.10.7, 9.10.7(sub), 9.11.3, 9.12.0
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
(no value)
Priority:
P2 Normal
Severity:
S2 Normal
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
(no value)
Area:
bug

Dates
Created:Mon, 06 Nov 2017 20:24:06 -0500
Updated:Wed, 08 Nov 2017 04:21:53 -0500
Closed:Tue, 07 Nov 2017 18:19:42 -0500



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

From: marka@isc.org
Date: Mon, 06 Nov 2017 15:24:06 -1000
To: bind9-public@isc.org
Subject: chain system test fails if IPv6 is not available or addresses are not configure.
ans4/ans.py raises a exception if IPv6 is not available or the address is not configured.
ready for review
> diff --git a/bin/tests/system/chain/ans4/ans.py b/bin/tests/system/chain/ans4/ans.py > index 80c519c382..36e1e7e314 100755 > --- a/bin/tests/system/chain/ans4/ans.py > +++ b/bin/tests/system/chain/ans4/ans.py > @@ -270,8 +270,17 @@ sock = 5300 > > query4_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) > query4_socket.bind((ip4, sock)) > -query6_socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) > -query6_socket.bind((ip6, sock)) > + > +havev6 = 1 "havev6" is a boolean flag, we should use True/False for its values. (Same for "running", BTW.) > +try: > + query6_socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) > + try: > + query6_socket.bind((ip6, sock)) > + except: > + query6_socket.close() > + havev6 = 0 Is there any practical _IPv6-specific_ scenario that you have come across in which creating a socket succeeds, but bind() fails? While I appreciate the attempt to handle errors gracefully, this causes IPv6 socket errors to be treated differently than IPv4 socket errors. I would either apply the same logic to IPv4 sockets or drop this inner try-except completely (with preference for the latter; this is test code, so I would rather see it fail hard under suspicious conditions than cover them up by trying to behave nicely). > +except: I would limit this to socket.error exceptions. (I am aware Python 3.3+ raises OSError instead, but we already use socket.error elsewhere in this script and socket.error is currently aliased to OSError in newer Python versions.) Looks good otherwise. I also verified that it does what it claims to.
4810. [test] The chain system test failed if the IPv6 interfaces were not configured. [RT #46508]
It seems to me that rt46508 was merged with just 1 out of 3 review comments addressed. If this was intentional, I think it would be useful for posterity if this ticket was updated with the rationale for doing this.
IPv4 is mandatory. IPv6 may or may not exist or be configured.