1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
# Test that the install command creates local-networks.zeek file with correct
# contents.
#
# @TEST-EXEC: bash %INPUT
# @TEST-EXEC: btest-diff ipv4-v6.out
# @TEST-EXEC: btest-diff ipv4.out
# @TEST-EXEC: btest-diff ipv6.out
. zeekctl-test-setup
### Test a mix of IPv4 and IPv6 networks
while read line; do installfile $line; done << EOF
etc/networks.cfg__ipv4_ipv6
EOF
zeekctl install
cp $ZEEKCTL_INSTALL_PREFIX/spool/installed-scripts-do-not-touch/auto/local-networks.zeek ipv4-v6.out
### Test IPv4 networks only
while read line; do installfile $line; done << EOF
etc/networks.cfg__ipv4
EOF
zeekctl install
cp $ZEEKCTL_INSTALL_PREFIX/spool/installed-scripts-do-not-touch/auto/local-networks.zeek ipv4.out
### Test IPv6 networks only
while read line; do installfile $line; done << EOF
etc/networks.cfg__ipv6
EOF
zeekctl install
cp $ZEEKCTL_INSTALL_PREFIX/spool/installed-scripts-do-not-touch/auto/local-networks.zeek ipv6.out
|