4810. [test] The chain system test failed if the IPv6 interfaces

were not configured. [RT #46508]
This commit is contained in:
Mark Andrews 2017-11-08 10:17:03 +11:00
parent 5b1e929b8b
commit c652213857
2 changed files with 22 additions and 6 deletions

View file

@ -1,3 +1,6 @@
4810. [test] The chain system test failed if the IPv6 interfaces
were not configured. [RT #46508]
--- 9.12.0b2 released ---
4809. [port] Check at configure time whether -latomic is needed

View file

@ -254,7 +254,7 @@ def create_response(msg):
def sigterm(signum, frame):
print ("Shutting down now...")
os.remove('ans.pid')
running = 0
running = False
sys.exit(0)
############################################################################
@ -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 = True
try:
query6_socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
try:
query6_socket.bind((ip6, sock))
except:
query6_socket.close()
havev6 = False
except:
havev6 = False
ctrl_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ctrl_socket.bind((ip4, sock + 1))
@ -284,14 +293,18 @@ pid = os.getpid()
print (pid, file=f)
f.close()
running = 1
running = True
print ("Listening on %s port %d" % (ip4, sock))
print ("Listening on %s port %d" % (ip6, sock))
if havev6:
print ("Listening on %s port %d" % (ip6, sock))
print ("Control channel on %s port %d" % (ip4, sock + 1))
print ("Ctrl-c to quit")
input = [query4_socket, query6_socket, ctrl_socket]
if havev6:
input = [query4_socket, query6_socket, ctrl_socket]
else:
input = [query4_socket, ctrl_socket]
while running:
try: