summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/util.sh10
-rwxr-xr-xlib/parse-functions.sh16
2 files changed, 17 insertions, 9 deletions
diff --git a/ci/util.sh b/ci/util.sh
index 6681ff56..bcb3a3a7 100755
--- a/ci/util.sh
+++ b/ci/util.sh
@@ -91,13 +91,19 @@ parse_cmdline() {
;;
mock-detached)
if [ "$2" == "on" ]; then
- echo "Blocking output http and https traffic"
+ echo "Blocking output http (80) traffic"
iptables -A OUTPUT -p tcp --dport 80 -j REJECT
+ echo "Blocking output https (443) traffic"
iptables -A OUTPUT -p tcp --dport 443 -j REJECT
+ echo "Blocking output dns (53) traffic"
+ iptables -A OUTPUT -p tcp --dport 53 -j REJECT
elif [ "$2" == "off" ]; then
- echo "Allowing output http and https traffic"
+ echo "Allowing output http (80) traffic"
iptables -D OUTPUT -p tcp --dport 80 -j REJECT
+ echo "Allowing output https (443) traffic"
iptables -D OUTPUT -p tcp --dport 443 -j REJECT
+ echo "Allowing output dns (53) traffic"
+ iptables -D OUTPUT -p tcp --dport 53 -j REJECT
else
display_usage
fi
diff --git a/lib/parse-functions.sh b/lib/parse-functions.sh
index 0be62e25..a582c28a 100755
--- a/lib/parse-functions.sh
+++ b/lib/parse-functions.sh
@@ -55,13 +55,15 @@ parse_network_settings() {
local output parse_ext
parse_ext=''
- for val in ${performance_roles[@]}; do
- if [ "$val" == "Compute" ]; then
- parse_ext="${parse_ext} --compute-pre-config "
- elif [ "$val" == "Controller" ]; then
- parse_ext="${parse_ext} --controller-pre-config "
- fi
- done
+ if [[ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' || "${deploy_options_array['dataplane']}" == 'fdio' ]]; then
+ for val in ${performance_roles[@]}; do
+ if [ "$val" == "Compute" ]; then
+ parse_ext="${parse_ext} --compute-pre-config "
+ elif [ "$val" == "Controller" ]; then
+ parse_ext="${parse_ext} --controller-pre-config "
+ fi
+ done
+ fi
if output=$(python3.4 -B $LIB/python/apex_python_utils.py parse-net-settings -s $NETSETS $net_isolation_arg -e $CONFIG/network-environment.yaml $parse_ext); then
echo -e "${blue}${output}${reset}"