Remove absolute path with iptables when L3 enabled

In Ubuntu 20.04.1 LTS, a path of iptables is not /sbin/iptables but
/usr/sbin/iptables.  So, current code gets an error with
"/sbin/iptables" failed : No such file or directory
This commit fixes to use iptables when neutron L3 service is enabled on
Ubuntu 20.04.1 LTS.

Change-Id: I76eb89a2ae26431065cd19f0af235e71eb9f4169
This commit is contained in:
Yushiro FURUKAWA 2020-08-31 08:54:38 +09:00
parent 99e8fc9810
commit 02fc64a35b
1 changed files with 2 additions and 2 deletions

View File

@ -2592,8 +2592,8 @@ function configure_iptables {
local qrouter
qrouter=$(sudo ip netns list | grep qrouter | awk '{print $1;}')
if [[ ! -z "$qrouter" ]]; then
sudo ip netns exec $qrouter /sbin/iptables -A PREROUTING -t raw -p udp --dport 69 -j CT --helper tftp
sudo ip netns exec $qrouter /sbin/ip6tables -A PREROUTING -t raw -p udp --dport 69 -j CT --helper tftp || true
sudo ip netns exec $qrouter iptables -A PREROUTING -t raw -p udp --dport 69 -j CT --helper tftp
sudo ip netns exec $qrouter ip6tables -A PREROUTING -t raw -p udp --dport 69 -j CT --helper tftp || true
fi
}