Fix 'add to iptables command' parameter
Benjamin Renard

Benjamin Renard commited on 2014-01-13 17:09:02
Showing 1 changed files, with 2 additions and 2 deletions.

... ...
@@ -131,8 +131,8 @@ Destination services : '$ACL_DST_PORTS'"
131 131
 
132 132
 function convert_2_iptables_cmd() {
133 133
 	MULTIPORTS=0
134
-	CMD="iptables -I FORWARD"
135
-	[ "$ACL_PROTO" != 'ip' ] && CMD="$CMD $ADD_TO_IPTABLES_CMD -p $ACL_PROTO"
134
+	CMD="iptables -I FORWARD $ADD_TO_IPTABLES_CMD"
135
+	[ "$ACL_PROTO" != 'ip' ] && CMD="$CMD -p $ACL_PROTO"
136 136
 	
137 137
 	SRC="$( convert_ip_mask_to_arg "$ACL_SRC_NET" "$ACL_SRC_MASK" )"
138 138
 	[ "$SRC" == "" ] && echo "ERROR : Fail to convert source" > /dev/stderr && return 1
139 139