selftest: dns_hub doesn't need to store $swiface
authorTim Beale <timbeale@catalyst.net.nz>
Wed, 13 Feb 2019 01:21:16 +0000 (14:21 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 5 Mar 2019 23:27:30 +0000 (23:27 +0000)
dns_hub doesn't need to store $ctx->{swiface}. Other testenvs store this
and export it as SOCKET_WRAPPER_DEFAULT_IFACE (i.e. for the tests to
use), but dns_hub doesn't need to do this.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/target/Samba4.pm

index bbe3ece9fc819a9cf0c25dae8ab7dd9e55d10643..84b7fa9dc03f8b8b195ea980f95491d71930e135 100755 (executable)
@@ -385,14 +385,11 @@ sub setup_dns_hub_internal($$$)
                warn("Unable to clean up");
        }
 
-       my $swiface = Samba::get_interface($hostname);
-
        my $env = undef;
        $env->{prefix} = $prefix;
        $env->{prefix_abs} = $prefix_abs;
 
        $env->{hostname} = $hostname;
-       $env->{swiface} = $swiface;
 
        $env->{ipv4} = Samba::get_ipv4_addr($hostname);
        $env->{ipv6} = Samba::get_ipv6_addr($hostname);
@@ -420,6 +417,7 @@ sub setup_dns_hub_internal($$$)
                open STDOUT, "| tee $env->{DNS_HUB_LOG} 1>&2";
                open STDERR, '>&STDOUT';
 
+               my $swiface = Samba::get_interface($hostname);
                SocketWrapper::set_default_iface($swiface);
                my $pcap_file = "$ENV{SOCKET_WRAPPER_PCAP_DIR}/env-$hostname$.pcap";
                SocketWrapper::setup_pcap($pcap_file);