From aa3667dd07470abaf44be4c24089dee5c3cc868f Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 21 Dec 2021 20:59:15 +0000 Subject: [PATCH] test: add iptables entry to forward packets across veth bridge It seems like some distros or kernels do not automatically forward packets across the bridge we set up in nvmf_veth_init. So add an iptables entry to explicitly add a forwarding rule. Signed-off-by: Jim Harris Change-Id: I50bc203afcfee888c27c0e1d77609e554dedc61e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10810 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Changpeng Liu --- test/nvmf/common.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index 3663f9054..d68b88b17 100644 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -316,6 +316,7 @@ function nvmf_veth_init() { # Accept connections from veth interface iptables -I INPUT 1 -i $NVMF_INITIATOR_INTERFACE -p tcp --dport $NVMF_PORT -j ACCEPT + iptables -A FORWARD -i $NVMF_BRIDGE -o $NVMF_BRIDGE -j ACCEPT # Verify connectivity ping -c 1 $NVMF_FIRST_TARGET_IP