* Functest's testcase running in the docker, and need access openstack's
network. But the libvirt nat networks will create forward iptable rules,
which reject the connection from the docker.
Change-Id: Id0122879aa133ccb81a0bba1ea8d06ac36a65290
Author: carey.xu<carey.xuhan@huawei.com>
Signed-off-by: carey.xu <carey.xuhan@huawei.com>
+function clear_forward_rejct_rules()
+{
+ while sudo iptables -nL FORWARD --line-number|grep -E 'REJECT +all +-- +0.0.0.0/0 +0.0.0.0/0 +reject-with icmp-port-unreachable'|head -1|awk '{print $1}'|xargs sudo iptables -D FORWARD; do :; done
+}
+
function setup_bridge_net()
{
net_name=$1
# create external network
setup_bridge_external
+ clear_forward_rejct_rules
}