+

Fix 'add to iptables command' parameter

Benjamin Renard [2014-01-13 17:09:02]
Fix 'add to iptables command' parameter
Filename
cisco-acl-to-iptables
diff --git a/cisco-acl-to-iptables b/cisco-acl-to-iptables
index dc27556..59606d9 100755
--- a/cisco-acl-to-iptables
+++ b/cisco-acl-to-iptables
@@ -131,8 +131,8 @@ Destination services : '$ACL_DST_PORTS'"

 function convert_2_iptables_cmd() {
 	MULTIPORTS=0
-	CMD="iptables -I FORWARD"
-	[ "$ACL_PROTO" != 'ip' ] && CMD="$CMD $ADD_TO_IPTABLES_CMD -p $ACL_PROTO"
+	CMD="iptables -I FORWARD $ADD_TO_IPTABLES_CMD"
+	[ "$ACL_PROTO" != 'ip' ] && CMD="$CMD -p $ACL_PROTO"

 	SRC="$( convert_ip_mask_to_arg "$ACL_SRC_NET" "$ACL_SRC_MASK" )"
 	[ "$SRC" == "" ] && echo "ERROR : Fail to convert source" > /dev/stderr && return 1
ViewGit