summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wintest/conf/abartlet.conf1
-rw-r--r--wintest/conf/tridge.conf1
-rwxr-xr-xwintest/test-s4-howto.py17
3 files changed, 12 insertions, 7 deletions
diff --git a/wintest/conf/abartlet.conf b/wintest/conf/abartlet.conf
index 3fa4501739..f775c81b3a 100644
--- a/wintest/conf/abartlet.conf
+++ b/wintest/conf/abartlet.conf
@@ -19,7 +19,6 @@ INTERFACE : virbr0:0
# this is an additional IP that will be used for named to listen
# on. It should not be the primary IP of the interface
INTERFACE_IP : 192.168.122.2
-INTERFACE_IPV6 : 3ffe:ffff:0:f101::3
INTERFACE_NET : 192.168.122.2/24
# how to run bind9
diff --git a/wintest/conf/tridge.conf b/wintest/conf/tridge.conf
index a2bad630a2..1c7ed0bda7 100644
--- a/wintest/conf/tridge.conf
+++ b/wintest/conf/tridge.conf
@@ -19,7 +19,6 @@ INTERFACE : virbr0:0
# this is an additional IP that will be used for named to listen
# on. It should not be the primary IP of the interface
INTERFACE_IP : 10.0.0.2
-INTERFACE_IPV6 : 3ffe:ffff:0:f101::3
INTERFACE_NET : 10.0.0.2/24
# how to run bind9
diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py
index d12968c50f..a1a211f8ae 100755
--- a/wintest/test-s4-howto.py
+++ b/wintest/test-s4-howto.py
@@ -13,8 +13,9 @@ def check_prerequesites(t):
raise Exception("You must run this script as root")
t.putenv("KRB5_CONFIG", '${PREFIX}/private/krb5.conf')
t.run_cmd('ifconfig ${INTERFACE} ${INTERFACE_NET} up')
- t.run_cmd('ifconfig ${INTERFACE} inet6 del ${INTERFACE_IPV6}/64', checkfail=False)
- t.run_cmd('ifconfig ${INTERFACE} inet6 add ${INTERFACE_IPV6}/64 up')
+ if t.getvar('INTERFACE_IPV6'):
+ t.run_cmd('ifconfig ${INTERFACE} inet6 del ${INTERFACE_IPV6}/64', checkfail=False)
+ t.run_cmd('ifconfig ${INTERFACE} inet6 add ${INTERFACE_IPV6}/64 up')
def build_s4(t):
@@ -133,10 +134,16 @@ def restart_bind(t):
raise RuntimeError("old /etc/resolv.conf must not contain %s as a nameserver, this will create loops with the generated dns configuration" % nameserver)
t.setvar('DNSSERVER', nameserver)
+ if t.getvar('INTERFACE_IPV6'):
+ ipv6_listen = 'listen-on-v6 port 53 { ${INTERFACE_IPV6}; };'
+ else:
+ ipv6_listen = ''
+ t.setvar('BIND_LISTEN_IPV6', ipv6_listen)
+
t.write_file("etc/named.conf", '''
options {
listen-on port 53 { ${INTERFACE_IP}; };
- listen-on-v6 port 53 { ${INTERFACE_IPV6}; };
+ ${BIND_LISTEN_IPV6}
directory "${PREFIX}/var/named";
dump-file "${PREFIX}/var/named/data/cache_dump.db";
pid-file "${PREFIX}/var/named/named.pid";
@@ -494,7 +501,7 @@ def join_as_dc(t, vm):
child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True)
t.get_ipconfig(child)
t.retry_cmd("bin/samba-tool drs showrepl ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator%${WIN_PASS}", ['INBOUND NEIGHBORS'] )
- t.run_cmd('bin/samba-tool join ${WIN_REALM} DC -Uadministrator%${WIN_PASS} -d${DEBUGLEVEL} --option=interfaces="${INTERFACE} ${INTERFACE_IPV6"')
+ t.run_cmd('bin/samba-tool join ${WIN_REALM} DC -Uadministrator%${WIN_PASS} -d${DEBUGLEVEL} --option=interfaces=${INTERFACE}')
t.run_cmd('bin/samba-tool drs kcc ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}')
@@ -563,7 +570,7 @@ def join_as_rodc(t, vm):
child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_DOMAIN}\\administrator", "${WIN_PASS}", set_time=True)
t.get_ipconfig(child)
t.retry_cmd("bin/samba-tool drs showrepl ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator%${WIN_PASS}", ['INBOUND NEIGHBORS'] )
- t.run_cmd('bin/samba-tool join ${WIN_REALM} RODC -Uadministrator%${WIN_PASS} -d${DEBUGLEVEL} --option=interfaces="${INTERFACE} ${INTERFACE_IPV6}"')
+ t.run_cmd('bin/samba-tool join ${WIN_REALM} RODC -Uadministrator%${WIN_PASS} -d${DEBUGLEVEL} --option=interfaces=${INTERFACE}')
t.run_cmd('bin/samba-tool drs kcc ${WIN_HOSTNAME}.${WIN_REALM} -Uadministrator@${WIN_REALM}%${WIN_PASS}')