Date: Thu, 26 Oct 2017 20:53:56 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325020 - head/tests/sys/netpfil/pf Message-ID: <201710262053.v9QKruXf059706@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Thu Oct 26 20:53:56 2017 New Revision: 325020 URL: https://svnweb.freebsd.org/changeset/base/325020 Log: pf tests: destroy jails before destroying interfaces When cleaning up we must destroy the jails before we destroy the interfaces. Otherwise we might try to destroy interfaces that belong to a jail, which won't work and fail to completely clean up. Modified: head/tests/sys/netpfil/pf/utils.subr Modified: head/tests/sys/netpfil/pf/utils.subr ============================================================================== --- head/tests/sys/netpfil/pf/utils.subr Thu Oct 26 20:44:42 2017 (r325019) +++ head/tests/sys/netpfil/pf/utils.subr Thu Oct 26 20:53:56 2017 (r325020) @@ -51,17 +51,17 @@ pft_set_rules() pft_cleanup() { - if [ -f created_interfaces.lst ]; then - for ifname in `cat created_interfaces.lst` + if [ -f created_jails.lst ]; then + for jailname in `cat created_jails.lst` do - ifconfig ${ifname} destroy + jail -r ${jailname} done fi - if [ -f created_jails.lst ]; then - for jailname in `cat created_jails.lst` + if [ -f created_interfaces.lst ]; then + for ifname in `cat created_interfaces.lst` do - jail -r ${jailname} + ifconfig ${ifname} destroy done fi }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710262053.v9QKruXf059706>