File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ OPTION_IF=0
248
248
OPTION_SRC=0
249
249
OPTION_DST=0
250
250
OPTION_INET_TYPE=0
251
+ OPT_SRC_TABLE=0
251
252
while [ " $# " -gt 0 ]; do
252
253
case " ${1} " in
253
254
-h|--help|help)
@@ -277,6 +278,7 @@ while [ "$#" -gt 0 ]; do
277
278
RDR_SRC=" ${2} "
278
279
else
279
280
check_rdr_table_validity " ${2} "
281
+ OPT_SRC_TABLE=1
280
282
RDR_SRC=" $( echo " ${2} " | sed -e ' s/^/</' -e ' s/$/>/' ) "
281
283
fi
282
284
OPTION_SRC=1
@@ -357,8 +359,8 @@ while [ "$#" -gt 0 ]; do
357
359
tcp|udp)
358
360
if [ " $# " -lt 3 ]; then
359
361
usage
360
- elif [ " ${OPTION_SRC} " -eq 1 ] || [ " ${OPTION_DST} " -eq 1 ] && [ " ${OPTION_INET_TYPE} " -ne 1 ]; then
361
- error_exit " [ERROR]: [-t|--type] must be set when using [-s|--source] or [-d|--destination]"
362
+ elif [ " ${OPTION_SRC} " -eq 1 ] || [ " ${OPTION_DST} " -eq 1 ] && [ " ${OPTION_INET_TYPE} " -ne 1 ] && [ " ${OPT_SRC_TABLE} " -eq 0 ] ; then
363
+ error_exit " [ERROR]: [-t|--type] must be set when NOT using a table as [-s|--source] or [-d|--destination]. "
362
364
elif [ " $# " -eq 3 ]; then
363
365
check_jail_validity
364
366
validate_rdr_rule $RDR_IF $RDR_SRC $RDR_DST $1 $2 $3
You can’t perform that action at this time.
0 commit comments